@lwc/synthetic-shadow 2.22.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/synthetic-shadow.js +13 -10
- package/package.json +3 -3
package/dist/synthetic-shadow.js
CHANGED
@@ -148,7 +148,7 @@ const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
148
148
|
// We use this to detect symbol support in order to avoid the expensive symbol polyfill. Note that
|
149
149
|
// we can't use typeof since it will fail when transpiling.
|
150
150
|
const hasNativeSymbolSupport = /*@__PURE__*/ (() => Symbol('x').toString() === 'Symbol(x)')();
|
151
|
-
/** version: 2.
|
151
|
+
/** version: 2.23.0 */
|
152
152
|
|
153
153
|
/*
|
154
154
|
* Copyright (c) 2018, salesforce.com, inc.
|
@@ -299,7 +299,7 @@ const elementsFromPoint = hasOwnProperty.call(Document.prototype, 'elementsFromP
|
|
299
299
|
// defaultView can be null when a document has no browsing context. For example, the owner document
|
300
300
|
// of a node in a template doesn't have a default view: https://jsfiddle.net/hv9z0q5a/
|
301
301
|
const defaultViewGetter = getOwnPropertyDescriptor(Document.prototype, 'defaultView').get;
|
302
|
-
const { createComment,
|
302
|
+
const { createComment, querySelectorAll, getElementById, getElementsByClassName, getElementsByTagName, getElementsByTagNameNS, } = Document.prototype;
|
303
303
|
// In Firefox v57 and lower, getElementsByName is defined on HTMLDocument.prototype
|
304
304
|
// In all other browsers have the method on Document.prototype
|
305
305
|
const { getElementsByName } = HTMLDocument.prototype;
|
@@ -1124,7 +1124,7 @@ if (!_globalThis.lwcRuntimeFlags) {
|
|
1124
1124
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
1125
1125
|
}
|
1126
1126
|
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
1127
|
-
/** version: 2.
|
1127
|
+
/** version: 2.23.0 */
|
1128
1128
|
|
1129
1129
|
/*
|
1130
1130
|
* Copyright (c) 2018, salesforce.com, inc.
|
@@ -4953,16 +4953,19 @@ defineProperty(Element.prototype, KEY__SHADOW_TOKEN, {
|
|
4953
4953
|
},
|
4954
4954
|
configurable: true,
|
4955
4955
|
});
|
4956
|
+
function recursivelySetShadowResolver(node, fn) {
|
4957
|
+
node[KEY__SHADOW_RESOLVER] = fn;
|
4958
|
+
const childNodes = childNodesGetter.call(node);
|
4959
|
+
for (let i = 0, n = childNodes.length; i < n; i++) {
|
4960
|
+
recursivelySetShadowResolver(childNodes[i], fn);
|
4961
|
+
}
|
4962
|
+
}
|
4956
4963
|
defineProperty(Element.prototype, KEY__SHADOW_STATIC, {
|
4957
4964
|
set(v) {
|
4958
4965
|
// Marking an element as static will propagate the shadow resolver to the children.
|
4959
|
-
const fn = this[KEY__SHADOW_RESOLVER];
|
4960
4966
|
if (v) {
|
4961
|
-
const
|
4962
|
-
|
4963
|
-
while ((currentNode = treeWalker.nextNode())) {
|
4964
|
-
currentNode[KEY__SHADOW_RESOLVER] = fn;
|
4965
|
-
}
|
4967
|
+
const fn = this[KEY__SHADOW_RESOLVER];
|
4968
|
+
recursivelySetShadowResolver(this, fn);
|
4966
4969
|
}
|
4967
4970
|
this[KEY__SHADOW_STATIC_PRIVATE] = v;
|
4968
4971
|
},
|
@@ -5111,4 +5114,4 @@ if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
|
|
5111
5114
|
}));
|
5112
5115
|
});
|
5113
5116
|
}
|
5114
|
-
/** version: 2.
|
5117
|
+
/** version: 2.23.0 */
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lwc/synthetic-shadow",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.23.0",
|
4
4
|
"description": "Synthetic Shadow Root for LWC",
|
5
5
|
"homepage": "https://lwc.dev/",
|
6
6
|
"repository": {
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"access": "public"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
-
"@lwc/features": "2.
|
41
|
-
"@lwc/shared": "2.
|
40
|
+
"@lwc/features": "2.23.0",
|
41
|
+
"@lwc/shared": "2.23.0"
|
42
42
|
}
|
43
43
|
}
|