Skip to content

v2.4.0

Latest
Compare
Choose a tag to compare
@justinfagnani justinfagnani released this 19 Aug 21:39
· 62 commits to master since this release

Changed

  • Set type in package.json to "module" (#974)

Added

  • Adds a cache: boolean argument to the @query decorator as a performance optimization for properties whose queried element is not expected to change. If cache is set to true, element DOM is queried when the property is first accessed, and the value is cached so it can be immediately returned on all subsequent property accesses. (#1013)

  • Adds a selector: string argument to the @queryAssignedNodes decorator as a convenience to filter the assigned nodes by the given selector (#1016).

  • The requestUpdateInternal(name, oldValue, options) method has been added. This method is sometimes useful to call in a custom property setter to optimize performance. It is slightly more efficient than requestUpdate since it does not return the updateComplete property which can be overridden to do work.

  • The protected performUpdate() method may now be called to syncronously "flush" a pending update, for example via a property setter. Note, performing a synchronous update only updates the element and not any potentially pending descendants in the element's local DOM (#959).

  • Constructible stylesheets may now be provided directly as styles, in addition to using the css tagged template function (#853).

Fixed

  • queryAssignedNodes doesn't correctly locate default slot (#1002)