Releases: lit/lit-element
v2.4.0
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 thanrequestUpdate
since it does not return theupdateComplete
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)
v2.3.1
Fixed
- Add TypeScript type declarations for older versions of TypeScript. We're currently testing back to TS 3.4. We can't commit to never breaking TypeScript builds, but we'll be supporting older versions as best we can.
v2.3.0
Changed
- Added a static
getPropertyDescriptor
method to allow easier customization of property accessors. This method should return a aPropertyDescriptor
to install on the property. If no descriptor is returned, no property accessor is created. (#911) - The value returned by
render
is always rendered, even if it isn't aTemplateResult
. (#712)
Added
- Added
@queryAsync(selector)
decorator which returns a Promise that resolves to the result of querying for the given selector after the element'supdateComplete
Promise resolves (#903). - Added
enableUpdating()
toUpdatingElement
to enable customizing when updating is enabled #860. - Added
@queryAssignedNodes(slotName, flatten)
decorator to enable querying assignedNodes for a given slot #860. - Added
getStyles()
toLitElement
to allow hooks into style gathering for component sets #866.
Fixed
- Ensure
UpdatingElement
allows updates when properties are set after callingsuper.update()
.
LitElement
renders when updates are triggered as a result of rendering (#549). - Properties annotated with the
eventOptions
decorator will now survive property renaming optimizations when used with tsickle and Closure JS Compiler. - Moved style gathering from
finalize
toinitialize
to be more lazy, and create stylesheets on the first instance initializing #866. - Fixed behavior change for components that do not implement
render()
introduced in (#712) (#917)
v2.1.0
[2.1.0] - 2019-03-21
Changed
LitElement.renderRoot
is nowpublic readonly
instead ofprotected
.
Fixed
- Exceptions generated during update/render do not block subsequent updates (#262).
- Initial update is scheduled at construction time rather than connected time (#594).
- A reflecting property set immediately after a corresponding attribute
now reflects properly (#592). - Properties annotated with the
@query
and@queryAll
decorators will now
survive property renaming optimizations when used with tsickle and Closure JS
Compiler.