@lwc/synthetic-shadow 6.0.0 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs.js +12 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +12 -25
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (
|
2
|
+
* Copyright (c) 2024 Salesforce, Inc.
|
3
3
|
*/
|
4
4
|
if (!globalThis.lwcRuntimeFlags) {
|
5
5
|
Object.defineProperty(globalThis, 'lwcRuntimeFlags', { value: Object.create(null) });
|
6
6
|
}
|
7
7
|
if (!lwcRuntimeFlags.ENABLE_FORCE_SHADOW_MIGRATE_MODE) {
|
8
8
|
/**
|
9
|
-
* Copyright (
|
9
|
+
* Copyright (c) 2024 Salesforce, Inc.
|
10
10
|
*/
|
11
11
|
/*
|
12
12
|
* Copyright (c) 2018, salesforce.com, inc.
|
@@ -87,18 +87,6 @@ function toString(obj) {
|
|
87
87
|
}
|
88
88
|
}
|
89
89
|
|
90
|
-
/*
|
91
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
92
|
-
* All rights reserved.
|
93
|
-
* SPDX-License-Identifier: MIT
|
94
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
95
|
-
*/
|
96
|
-
// See browser support for globalThis:
|
97
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility
|
98
|
-
/* istanbul ignore next */
|
99
|
-
// @ts-ignore
|
100
|
-
const _globalThis = typeof globalThis === 'object' ? globalThis : window;
|
101
|
-
|
102
90
|
/*
|
103
91
|
* Copyright (c) 2023, Salesforce.com, inc.
|
104
92
|
* All rights reserved.
|
@@ -117,16 +105,15 @@ const KEY__LEGACY_SHADOW_TOKEN_PRIVATE = '$$LegacyShadowTokenKey$$';
|
|
117
105
|
const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
118
106
|
const KEY__NATIVE_GET_ELEMENT_BY_ID = '$nativeGetElementById$';
|
119
107
|
const KEY__NATIVE_QUERY_SELECTOR_ALL = '$nativeQuerySelectorAll$';
|
120
|
-
/** version: 6.
|
108
|
+
/** version: 6.1.1 */
|
121
109
|
|
122
110
|
/**
|
123
|
-
* Copyright (
|
111
|
+
* Copyright (c) 2024 Salesforce, Inc.
|
124
112
|
*/
|
125
|
-
|
126
|
-
|
127
|
-
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
113
|
+
if (!globalThis.lwcRuntimeFlags) {
|
114
|
+
Object.defineProperty(globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
128
115
|
}
|
129
|
-
/** version: 6.
|
116
|
+
/** version: 6.1.1 */
|
130
117
|
|
131
118
|
/*
|
132
119
|
* Copyright (c) 2018, salesforce.com, inc.
|
@@ -1700,15 +1687,15 @@ defineProperty(_Node.prototype, KEY__SHADOW_RESOLVER, {
|
|
1700
1687
|
});
|
1701
1688
|
// The isUndefined check is because two copies of synthetic shadow may be loaded on the same page, and this
|
1702
1689
|
// would throw an error if we tried to redefine it. Plus the whole point is to expose the native method.
|
1703
|
-
if (isUndefined(
|
1704
|
-
defineProperty(
|
1690
|
+
if (isUndefined(globalThis[KEY__NATIVE_GET_ELEMENT_BY_ID])) {
|
1691
|
+
defineProperty(globalThis, KEY__NATIVE_GET_ELEMENT_BY_ID, {
|
1705
1692
|
value: getElementById,
|
1706
1693
|
configurable: true,
|
1707
1694
|
});
|
1708
1695
|
}
|
1709
1696
|
// See note above.
|
1710
|
-
if (isUndefined(
|
1711
|
-
defineProperty(
|
1697
|
+
if (isUndefined(globalThis[KEY__NATIVE_QUERY_SELECTOR_ALL])) {
|
1698
|
+
defineProperty(globalThis, KEY__NATIVE_QUERY_SELECTOR_ALL, {
|
1712
1699
|
value: querySelectorAll,
|
1713
1700
|
configurable: true,
|
1714
1701
|
});
|
@@ -4262,6 +4249,6 @@ defineProperty(Element.prototype, '$domManual$', {
|
|
4262
4249
|
},
|
4263
4250
|
configurable: true,
|
4264
4251
|
});
|
4265
|
-
/** version: 6.
|
4252
|
+
/** version: 6.1.1 */
|
4266
4253
|
}
|
4267
4254
|
//# sourceMappingURL=index.js.map
|