@lwc/synthetic-shadow
Advanced tools
Comparing version 8.11.0 to 8.12.0
@@ -7,3 +7,3 @@ { | ||
"name": "@lwc/synthetic-shadow", | ||
"version": "8.11.0", | ||
"version": "8.12.0", | ||
"description": "Synthetic Shadow Root for LWC", | ||
@@ -26,2 +26,5 @@ "keywords": [ | ||
}, | ||
"volta": { | ||
"extends": "../../../package.json" | ||
}, | ||
"main": "dist/index.cjs.js", | ||
@@ -47,4 +50,4 @@ "module": "dist/index.js", | ||
"devDependencies": { | ||
"@lwc/features": "8.11.0", | ||
"@lwc/shared": "8.11.0" | ||
"@lwc/features": "8.12.0", | ||
"@lwc/shared": "8.12.0" | ||
}, | ||
@@ -51,0 +54,0 @@ "lwc": { |
@@ -9,4 +9,4 @@ # Synthetic Shadow Root | ||
- Default content for `<slot>` elements is always empty. | ||
- `slotchange` is only available directly on the `<slot>` (it doesn't bubble as in the case of the native implementation). This restriction is in place because implementing `slotchange` requires using `MutationObserver` which is expensive at runtime. By only supporting `slotchange` event applied directly on the `<slot>` element, the LWC engine receives a clear signal that the component author is interested in listening to this event. This avoids spending unnecessary CPU time when the `slotchange` event is never consumed. | ||
- If you use `MutationObserver` to watch changes in a DOM tree, disconnect it or you will cause a memory leak. Note that a component can observe mutations only in its own template. It can't observe mutations within the shadow tree of other custom elements. | ||
- Default content for `<slot>` elements is always empty. | ||
- `slotchange` is only available directly on the `<slot>` (it doesn't bubble as in the case of the native implementation). This restriction is in place because implementing `slotchange` requires using `MutationObserver` which is expensive at runtime. By only supporting `slotchange` event applied directly on the `<slot>` element, the LWC engine receives a clear signal that the component author is interested in listening to this event. This avoids spending unnecessary CPU time when the `slotchange` event is never consumed. | ||
- If you use `MutationObserver` to watch changes in a DOM tree, disconnect it or you will cause a memory leak. Note that a component can observe mutations only in its own template. It can't observe mutations within the shadow tree of other custom elements. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
662216