Releases: salesforce/lwc
Releases · salesforce/lwc
v1.8.5
v1.8.4
v1.8.3
Improvements
- #1617 - engine: Improve the diffing algorithm for slotted content. This change skips re-rendering unaffected slotted components which brings a significant performance boost in certain cases.
⚠️ Note⚠️ : As a side effect, components relying onrenderedCallback
to detect when slotted component changes might break. The right approach to detect slotted component changes is to use theslotchange
event.
Bug fixes
- #2036 - synthetic-shadow: Allow event listeners added prior to the evaluation of the
@lwc/synthetic-shadow
polyfill to be removed.
Internal
- #2037 - engine: Refactor usage of
setElementProto
.
v1.8.2
v1.8.1
v1.8.0
Improvements
- #2007, #2019 - engine: Add support for native custom elements reference in the template. With this change, an element tag registered with the custom elements registry using
customElements.define()
(https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define) can be referenced in a LWC component's template. Such an element will be upgraded using the registered custom element constructor.
Internal
- #2020 - template-compiler: Exposes missing compiler types
v1.7.14
Improvements
- #2000 - template-compiler: Optimizes the parse phase of the template compiler by using Acorn to parse expressions in a component template. Important: with this change, the following become invalid:
- Expressions in a template that end with
;
. For example:<template><button title={foo;}>click me</button></template>
. - Expressions in a template that are wrapped in extra curly brackets. For example:
<template><button title={{foo}}>click me</button></template>
.
- Expressions in a template that end with
v1.7.13
Improvements
- #1952 - template-compiler: Changes how boolean attributes and attributes used as boolean on standard HTML elements are rendered.
- All the attributes declared in the template on standard HTML elements are now set via attributes.
- Known boolean attributes (for example,
hidden
andrequired
, but with the exception ofchecked
) are set if their value is truthy. Otherwise, the attribute is omitted. For the rest of the attributes (for example,class
,data-*
, andfoo-bar
), the values are set if they are not nullish.
Internal