@lwrjs/client-modules 0.11.0-alpha.12 → 0.11.0-alpha.13
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.
|
@@ -1453,7 +1453,7 @@ const {
|
|
|
1453
1453
|
} = PromiseCtor$LWS.prototype;
|
|
1454
1454
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1455
1455
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1456
|
-
/*! version: 0.20.
|
|
1456
|
+
/*! version: 0.20.5 */
|
|
1457
1457
|
|
|
1458
1458
|
/*!
|
|
1459
1459
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2112,7 +2112,7 @@ const {
|
|
|
2112
2112
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2113
2113
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2114
2114
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2115
|
-
/*! version: 0.20.
|
|
2115
|
+
/*! version: 0.20.5 */
|
|
2116
2116
|
|
|
2117
2117
|
/*!
|
|
2118
2118
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2171,7 +2171,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
2171
2171
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
2172
2172
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
2173
2173
|
}
|
|
2174
|
-
/*! version: 0.20.
|
|
2174
|
+
/*! version: 0.20.5 */
|
|
2175
2175
|
|
|
2176
2176
|
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
|
|
2177
2177
|
|
|
@@ -3857,7 +3857,7 @@ try {
|
|
|
3857
3857
|
// swallow
|
|
3858
3858
|
}
|
|
3859
3859
|
const trusted = createPolicy('trusted', policyOptions);
|
|
3860
|
-
/*! version: 0.20.
|
|
3860
|
+
/*! version: 0.20.5 */
|
|
3861
3861
|
|
|
3862
3862
|
/*!
|
|
3863
3863
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4106,7 +4106,7 @@ function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
|
4106
4106
|
}
|
|
4107
4107
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
4108
4108
|
}
|
|
4109
|
-
/*! version: 0.20.
|
|
4109
|
+
/*! version: 0.20.5 */
|
|
4110
4110
|
|
|
4111
4111
|
/*!
|
|
4112
4112
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -4304,7 +4304,7 @@ function encloseSrcSetter$LWS(targetElement$LWS) {
|
|
|
4304
4304
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
4305
4305
|
};
|
|
4306
4306
|
}
|
|
4307
|
-
/*! version: 0.20.
|
|
4307
|
+
/*! version: 0.20.5 */
|
|
4308
4308
|
|
|
4309
4309
|
/*!
|
|
4310
4310
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4492,7 +4492,7 @@ class VirtualRegistry$LWS {
|
|
|
4492
4492
|
this._pendingRegistryByElement.set(instance$LWS, originalDefinition$LWS);
|
|
4493
4493
|
// We need to install the minimum HTMLElement prototype so that
|
|
4494
4494
|
// this instance works like a regular element without a registered
|
|
4495
|
-
// definition. `this
|
|
4495
|
+
// definition. `instanceRegistryMap.get(this)!.upgrade()` will eventually
|
|
4496
4496
|
// install the full custom element prototype.
|
|
4497
4497
|
ReflectSetPrototypeOf$LWS$1(instance$LWS, this._originalHTMLElementCtor.prototype);
|
|
4498
4498
|
}
|
|
@@ -4597,6 +4597,7 @@ function createDefinitionRecord$LWS(LocalCtor$LWS) {
|
|
|
4597
4597
|
formStateRestoreCallback: typeof formStateRestoreCallback$LWS === 'function' ? formStateRestoreCallback$LWS : undefined
|
|
4598
4598
|
};
|
|
4599
4599
|
}
|
|
4600
|
+
const instanceRegistryMap$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
4600
4601
|
// Helper to create stand-in element for each tagName registered that delegates
|
|
4601
4602
|
// out to the registry for the given element.
|
|
4602
4603
|
function createPivotingClass$LWS(document$LWS, originalHTMLElementCtor$LWS,
|
|
@@ -4612,11 +4613,12 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4612
4613
|
// b) A `new LocalCtor()` call from the blue realm (system mode).
|
|
4613
4614
|
// c) A `new LocalCtor()` call from the red realm (sandbox).
|
|
4614
4615
|
super();
|
|
4616
|
+
let instanceRegistry$LWS;
|
|
4615
4617
|
if (localRegistry$LWS && definition$LWS) {
|
|
4616
|
-
|
|
4618
|
+
instanceRegistry$LWS = localRegistry$LWS;
|
|
4617
4619
|
localRegistry$LWS.setDefinition(this, definition$LWS);
|
|
4618
4620
|
} else {
|
|
4619
|
-
|
|
4621
|
+
instanceRegistry$LWS =
|
|
4620
4622
|
// Usually `el.innerHTML` or any other parsing driven
|
|
4621
4623
|
// initialization.
|
|
4622
4624
|
getNodeRegistry$LWS(document$LWS, this) ||
|
|
@@ -4627,11 +4629,12 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4627
4629
|
getCurrentRegistry$LWS() ||
|
|
4628
4630
|
// Global stuff.
|
|
4629
4631
|
getGlobalCustomElementRegistry$LWS(document$LWS, originalHTMLElementCtor$LWS);
|
|
4630
|
-
|
|
4632
|
+
instanceRegistry$LWS.scheduleOrUpgrade(this, tagName$LWS, originalDefinition$LWS);
|
|
4631
4633
|
}
|
|
4634
|
+
instanceRegistryMap$LWS.set(this, instanceRegistry$LWS);
|
|
4632
4635
|
}
|
|
4633
4636
|
adoptedCallback() {
|
|
4634
|
-
const definition$LWS = this.
|
|
4637
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4635
4638
|
const adoptedCallback$LWS = definition$LWS && definition$LWS.adoptedCallback;
|
|
4636
4639
|
// istanbul ignore else: currently unreachable via tests
|
|
4637
4640
|
if (adoptedCallback$LWS) {
|
|
@@ -4639,7 +4642,7 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4639
4642
|
}
|
|
4640
4643
|
}
|
|
4641
4644
|
attributeChangedCallback(attrName$LWS, oldValue$LWS, newValue$LWS) {
|
|
4642
|
-
const definition$LWS = this.
|
|
4645
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4643
4646
|
const attributeChangedCallback$LWS = definition$LWS && definition$LWS.attributeChangedCallback;
|
|
4644
4647
|
if (attributeChangedCallback$LWS && (
|
|
4645
4648
|
// If both definitions are the same, then the observedAttributes
|
|
@@ -4651,9 +4654,7 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4651
4654
|
}
|
|
4652
4655
|
}
|
|
4653
4656
|
connectedCallback() {
|
|
4654
|
-
const
|
|
4655
|
-
instanceRegistry: instanceRegistry$LWS
|
|
4656
|
-
} = this;
|
|
4657
|
+
const instanceRegistry$LWS = instanceRegistryMap$LWS.get(this);
|
|
4657
4658
|
const definition$LWS = instanceRegistry$LWS.getDefinition(this);
|
|
4658
4659
|
if (definition$LWS) {
|
|
4659
4660
|
const {
|
|
@@ -4667,9 +4668,7 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4667
4668
|
}
|
|
4668
4669
|
}
|
|
4669
4670
|
disconnectedCallback() {
|
|
4670
|
-
const
|
|
4671
|
-
instanceRegistry: instanceRegistry$LWS
|
|
4672
|
-
} = this;
|
|
4671
|
+
const instanceRegistry$LWS = instanceRegistryMap$LWS.get(this);
|
|
4673
4672
|
const definition$LWS = instanceRegistry$LWS.getDefinition(this);
|
|
4674
4673
|
if (definition$LWS) {
|
|
4675
4674
|
const {
|
|
@@ -4683,21 +4682,21 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4683
4682
|
}
|
|
4684
4683
|
}
|
|
4685
4684
|
formAssociatedCallback(form$LWS) {
|
|
4686
|
-
const definition$LWS = this.
|
|
4685
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4687
4686
|
const formAssociatedCallback$LWS = definition$LWS && definition$LWS.formAssociatedCallback;
|
|
4688
4687
|
if (formAssociatedCallback$LWS) {
|
|
4689
4688
|
ReflectApply$LWS$1(formAssociatedCallback$LWS, this, [form$LWS]);
|
|
4690
4689
|
}
|
|
4691
4690
|
}
|
|
4692
4691
|
formDisabledCallback(disabled$LWS) {
|
|
4693
|
-
const definition$LWS = this.
|
|
4692
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4694
4693
|
const formDisabledCallback$LWS = definition$LWS && definition$LWS.formDisabledCallback;
|
|
4695
4694
|
if (formDisabledCallback$LWS) {
|
|
4696
4695
|
ReflectApply$LWS$1(formDisabledCallback$LWS, this, [disabled$LWS]);
|
|
4697
4696
|
}
|
|
4698
4697
|
}
|
|
4699
4698
|
formResetCallback() {
|
|
4700
|
-
const definition$LWS = this.
|
|
4699
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4701
4700
|
const formResetCallback$LWS = definition$LWS && definition$LWS.formResetCallback;
|
|
4702
4701
|
if (formResetCallback$LWS) {
|
|
4703
4702
|
ReflectApply$LWS$1(formResetCallback$LWS, this, []);
|
|
@@ -4705,7 +4704,7 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4705
4704
|
}
|
|
4706
4705
|
// istanbul ignore next: currently unreachable via tests because the browser mechanics that would result in its execution cannot be simulated or reproduced.
|
|
4707
4706
|
formStateRestoreCallback(state$LWS, reason$LWS) {
|
|
4708
|
-
const definition$LWS = this.
|
|
4707
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4709
4708
|
const formStateRestoreCallback$LWS = definition$LWS && definition$LWS.formStateRestoreCallback;
|
|
4710
4709
|
if (formStateRestoreCallback$LWS) {
|
|
4711
4710
|
ReflectApply$LWS$1(formStateRestoreCallback$LWS, this, [state$LWS, reason$LWS]);
|
|
@@ -5861,6 +5860,9 @@ function initDistortionDocumentDomainSetter$LWS({
|
|
|
5861
5860
|
const {
|
|
5862
5861
|
isSharedElement: isSharedElement$r$LWS
|
|
5863
5862
|
} = rootValidator$LWS;
|
|
5863
|
+
function throwLockerSecurityError$LWS(command$LWS, target$LWS) {
|
|
5864
|
+
throw new LockerSecurityError$LWS(`Cannot execute command '${command$LWS}' on ${ReflectApply$LWS$1(NodeProtoNodeNameGetter$LWS, target$LWS, [])}.`);
|
|
5865
|
+
}
|
|
5864
5866
|
function initDistortionDocumentExecCommand$LWS({
|
|
5865
5867
|
document: document$LWS,
|
|
5866
5868
|
globalObject: {
|
|
@@ -5879,29 +5881,38 @@ function initDistortionDocumentExecCommand$LWS({
|
|
|
5879
5881
|
type: type$LWS
|
|
5880
5882
|
}) {
|
|
5881
5883
|
return [originalExecCommand$LWS, function execCommand$LWS(...args$LWS) {
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5884
|
+
const {
|
|
5885
|
+
length: length$LWS
|
|
5886
|
+
} = args$LWS;
|
|
5887
|
+
if (length$LWS >= 1) {
|
|
5888
|
+
const command$LWS = toString$LWS(args$LWS[0]);
|
|
5889
|
+
const loweredCommand$LWS = ReflectApply$LWS$1(StringProtoToLowerCase$LWS, command$LWS, []);
|
|
5890
|
+
if (length$LWS === 1 && loweredCommand$LWS === 'selectall' && this === rootDocument$LWS) {
|
|
5891
|
+
throwLockerSecurityError$LWS(command$LWS, this);
|
|
5892
|
+
}
|
|
5893
|
+
if (length$LWS > 2) {
|
|
5894
|
+
const {
|
|
5895
|
+
2: unsanitizedValue$LWS
|
|
5896
|
+
} = args$LWS;
|
|
5897
|
+
// istanbul ignore else: needs default platform behavior test
|
|
5898
|
+
if (unsanitizedValue$LWS !== null && unsanitizedValue$LWS !== undefined) {
|
|
5899
|
+
// istanbul ignore else: LWS does not test for all possible commands
|
|
5900
|
+
if (loweredCommand$LWS === 'inserthtml') {
|
|
5901
|
+
// istanbul ignore else: external is the default sandbox type for coverage runs
|
|
5902
|
+
if (type$LWS === 0 /* SandboxType.External */) {
|
|
5903
|
+
const activeElement$LWS = ReflectApply$LWS$1(originalActiveElement$LWS, this, []);
|
|
5904
|
+
if (isSharedElement$r$LWS(activeElement$LWS) && ReflectApply$LWS$1(originalIsContentEditable$LWS, activeElement$LWS, [])) {
|
|
5905
|
+
throwLockerSecurityError$LWS(command$LWS, activeElement$LWS);
|
|
5906
|
+
}
|
|
5896
5907
|
}
|
|
5908
|
+
// This must be called to signal to the virtual
|
|
5909
|
+
// CustomElementRegistry that the next thing created
|
|
5910
|
+
// MAY CONTAIN a custom element, which must be marked
|
|
5911
|
+
// for association to this sandbox.
|
|
5912
|
+
setCustomElementsRegistry$LWS(document$LWS, key$LWS);
|
|
5913
|
+
args$LWS[0] = command$LWS;
|
|
5914
|
+
args$LWS[2] = lwsInternalPolicy$LWS.createHTML(unsanitizedValue$LWS, key$LWS, ContentType$LWS.HTML);
|
|
5897
5915
|
}
|
|
5898
|
-
// This must be called to signal to the virtual
|
|
5899
|
-
// CustomElementRegistry that the next thing created
|
|
5900
|
-
// MAY CONTAIN a custom element, which must be marked
|
|
5901
|
-
// for association to this sandbox.
|
|
5902
|
-
setCustomElementsRegistry$LWS(document$LWS, key$LWS);
|
|
5903
|
-
args$LWS[0] = command$LWS;
|
|
5904
|
-
args$LWS[2] = lwsInternalPolicy$LWS.createHTML(unsanitizedValue$LWS, key$LWS, ContentType$LWS.HTML);
|
|
5905
5916
|
}
|
|
5906
5917
|
}
|
|
5907
5918
|
}
|
|
@@ -9862,8 +9873,8 @@ const HTMLElementBlockedProperties$LWS = ['nonce', 'onrejectionhandled', 'onunha
|
|
|
9862
9873
|
const HTMLEmbedElementBlockedProperties$LWS = ['getSVGDocument'];
|
|
9863
9874
|
|
|
9864
9875
|
// https://www.w3schools.com/tags/tag_iframe.asp
|
|
9865
|
-
const HTMLIFrameElementBlockedAttributes$LWS = ['
|
|
9866
|
-
const HTMLIFrameElementBlockedProperties$LWS = ['
|
|
9876
|
+
const HTMLIFrameElementBlockedAttributes$LWS = ['srcdoc'];
|
|
9877
|
+
const HTMLIFrameElementBlockedProperties$LWS = ['getSVGDocument', 'srcdoc'];
|
|
9867
9878
|
const HTMLObjectElementBlockedProperties$LWS = ['getSVGDocument'];
|
|
9868
9879
|
const HTMLScriptElementBlockedAttributes$LWS = ['nonce'];
|
|
9869
9880
|
const HTMLScriptElementBlockedProperties$LWS = ['nonce'];
|
|
@@ -9872,7 +9883,7 @@ const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
|
9872
9883
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9873
9884
|
const WindowBlockedProperties$LWS = ['find'];
|
|
9874
9885
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9875
|
-
/*! version: 0.20.
|
|
9886
|
+
/*! version: 0.20.5 */
|
|
9876
9887
|
|
|
9877
9888
|
/*!
|
|
9878
9889
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -15724,7 +15735,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15724
15735
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15725
15736
|
return secureDep$LWS;
|
|
15726
15737
|
}
|
|
15727
|
-
/*! version: 0.20.
|
|
15738
|
+
/*! version: 0.20.5 */
|
|
15728
15739
|
|
|
15729
15740
|
const loaderDefine = globalThis.LWR.define;
|
|
15730
15741
|
|
|
@@ -1453,7 +1453,7 @@ const {
|
|
|
1453
1453
|
} = PromiseCtor$LWS.prototype;
|
|
1454
1454
|
const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
|
|
1455
1455
|
const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
|
|
1456
|
-
/*! version: 0.20.
|
|
1456
|
+
/*! version: 0.20.5 */
|
|
1457
1457
|
|
|
1458
1458
|
/*!
|
|
1459
1459
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2112,7 +2112,7 @@ const {
|
|
|
2112
2112
|
const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
|
|
2113
2113
|
const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
|
|
2114
2114
|
ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
|
|
2115
|
-
/*! version: 0.20.
|
|
2115
|
+
/*! version: 0.20.5 */
|
|
2116
2116
|
|
|
2117
2117
|
/*!
|
|
2118
2118
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -2171,7 +2171,7 @@ function sanitizeURLForElement$LWS(url$LWS) {
|
|
|
2171
2171
|
function sanitizeURLString$LWS(urlString$LWS) {
|
|
2172
2172
|
return urlString$LWS === '' ? urlString$LWS : ReflectApply$LWS$1(StringProtoReplace$LWS, urlString$LWS, [newlinesAndTabsRegExp$LWS, '']);
|
|
2173
2173
|
}
|
|
2174
|
-
/*! version: 0.20.
|
|
2174
|
+
/*! version: 0.20.5 */
|
|
2175
2175
|
|
|
2176
2176
|
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */
|
|
2177
2177
|
|
|
@@ -3857,7 +3857,7 @@ try {
|
|
|
3857
3857
|
// swallow
|
|
3858
3858
|
}
|
|
3859
3859
|
const trusted = createPolicy('trusted', policyOptions);
|
|
3860
|
-
/*! version: 0.20.
|
|
3860
|
+
/*! version: 0.20.5 */
|
|
3861
3861
|
|
|
3862
3862
|
/*!
|
|
3863
3863
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4106,7 +4106,7 @@ function blobSanitizer$LWS(sandboxKey$LWS) {
|
|
|
4106
4106
|
}
|
|
4107
4107
|
return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
|
|
4108
4108
|
}
|
|
4109
|
-
/*! version: 0.20.
|
|
4109
|
+
/*! version: 0.20.5 */
|
|
4110
4110
|
|
|
4111
4111
|
/*!
|
|
4112
4112
|
* Copyright (C) 2023 salesforce.com, inc.
|
|
@@ -4304,7 +4304,7 @@ function encloseSrcSetter$LWS(targetElement$LWS) {
|
|
|
4304
4304
|
ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
|
|
4305
4305
|
};
|
|
4306
4306
|
}
|
|
4307
|
-
/*! version: 0.20.
|
|
4307
|
+
/*! version: 0.20.5 */
|
|
4308
4308
|
|
|
4309
4309
|
/*!
|
|
4310
4310
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -4492,7 +4492,7 @@ class VirtualRegistry$LWS {
|
|
|
4492
4492
|
this._pendingRegistryByElement.set(instance$LWS, originalDefinition$LWS);
|
|
4493
4493
|
// We need to install the minimum HTMLElement prototype so that
|
|
4494
4494
|
// this instance works like a regular element without a registered
|
|
4495
|
-
// definition. `this
|
|
4495
|
+
// definition. `instanceRegistryMap.get(this)!.upgrade()` will eventually
|
|
4496
4496
|
// install the full custom element prototype.
|
|
4497
4497
|
ReflectSetPrototypeOf$LWS$1(instance$LWS, this._originalHTMLElementCtor.prototype);
|
|
4498
4498
|
}
|
|
@@ -4597,6 +4597,7 @@ function createDefinitionRecord$LWS(LocalCtor$LWS) {
|
|
|
4597
4597
|
formStateRestoreCallback: typeof formStateRestoreCallback$LWS === 'function' ? formStateRestoreCallback$LWS : undefined
|
|
4598
4598
|
};
|
|
4599
4599
|
}
|
|
4600
|
+
const instanceRegistryMap$LWS = toSafeWeakMap$LWS$1(new WeakMapCtor$LWS$1());
|
|
4600
4601
|
// Helper to create stand-in element for each tagName registered that delegates
|
|
4601
4602
|
// out to the registry for the given element.
|
|
4602
4603
|
function createPivotingClass$LWS(document$LWS, originalHTMLElementCtor$LWS,
|
|
@@ -4612,11 +4613,12 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4612
4613
|
// b) A `new LocalCtor()` call from the blue realm (system mode).
|
|
4613
4614
|
// c) A `new LocalCtor()` call from the red realm (sandbox).
|
|
4614
4615
|
super();
|
|
4616
|
+
let instanceRegistry$LWS;
|
|
4615
4617
|
if (localRegistry$LWS && definition$LWS) {
|
|
4616
|
-
|
|
4618
|
+
instanceRegistry$LWS = localRegistry$LWS;
|
|
4617
4619
|
localRegistry$LWS.setDefinition(this, definition$LWS);
|
|
4618
4620
|
} else {
|
|
4619
|
-
|
|
4621
|
+
instanceRegistry$LWS =
|
|
4620
4622
|
// Usually `el.innerHTML` or any other parsing driven
|
|
4621
4623
|
// initialization.
|
|
4622
4624
|
getNodeRegistry$LWS(document$LWS, this) ||
|
|
@@ -4627,11 +4629,12 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4627
4629
|
getCurrentRegistry$LWS() ||
|
|
4628
4630
|
// Global stuff.
|
|
4629
4631
|
getGlobalCustomElementRegistry$LWS(document$LWS, originalHTMLElementCtor$LWS);
|
|
4630
|
-
|
|
4632
|
+
instanceRegistry$LWS.scheduleOrUpgrade(this, tagName$LWS, originalDefinition$LWS);
|
|
4631
4633
|
}
|
|
4634
|
+
instanceRegistryMap$LWS.set(this, instanceRegistry$LWS);
|
|
4632
4635
|
}
|
|
4633
4636
|
adoptedCallback() {
|
|
4634
|
-
const definition$LWS = this.
|
|
4637
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4635
4638
|
const adoptedCallback$LWS = definition$LWS && definition$LWS.adoptedCallback;
|
|
4636
4639
|
// istanbul ignore else: currently unreachable via tests
|
|
4637
4640
|
if (adoptedCallback$LWS) {
|
|
@@ -4639,7 +4642,7 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4639
4642
|
}
|
|
4640
4643
|
}
|
|
4641
4644
|
attributeChangedCallback(attrName$LWS, oldValue$LWS, newValue$LWS) {
|
|
4642
|
-
const definition$LWS = this.
|
|
4645
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4643
4646
|
const attributeChangedCallback$LWS = definition$LWS && definition$LWS.attributeChangedCallback;
|
|
4644
4647
|
if (attributeChangedCallback$LWS && (
|
|
4645
4648
|
// If both definitions are the same, then the observedAttributes
|
|
@@ -4651,9 +4654,7 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4651
4654
|
}
|
|
4652
4655
|
}
|
|
4653
4656
|
connectedCallback() {
|
|
4654
|
-
const
|
|
4655
|
-
instanceRegistry: instanceRegistry$LWS
|
|
4656
|
-
} = this;
|
|
4657
|
+
const instanceRegistry$LWS = instanceRegistryMap$LWS.get(this);
|
|
4657
4658
|
const definition$LWS = instanceRegistry$LWS.getDefinition(this);
|
|
4658
4659
|
if (definition$LWS) {
|
|
4659
4660
|
const {
|
|
@@ -4667,9 +4668,7 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4667
4668
|
}
|
|
4668
4669
|
}
|
|
4669
4670
|
disconnectedCallback() {
|
|
4670
|
-
const
|
|
4671
|
-
instanceRegistry: instanceRegistry$LWS
|
|
4672
|
-
} = this;
|
|
4671
|
+
const instanceRegistry$LWS = instanceRegistryMap$LWS.get(this);
|
|
4673
4672
|
const definition$LWS = instanceRegistry$LWS.getDefinition(this);
|
|
4674
4673
|
if (definition$LWS) {
|
|
4675
4674
|
const {
|
|
@@ -4683,21 +4682,21 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4683
4682
|
}
|
|
4684
4683
|
}
|
|
4685
4684
|
formAssociatedCallback(form$LWS) {
|
|
4686
|
-
const definition$LWS = this.
|
|
4685
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4687
4686
|
const formAssociatedCallback$LWS = definition$LWS && definition$LWS.formAssociatedCallback;
|
|
4688
4687
|
if (formAssociatedCallback$LWS) {
|
|
4689
4688
|
ReflectApply$LWS$1(formAssociatedCallback$LWS, this, [form$LWS]);
|
|
4690
4689
|
}
|
|
4691
4690
|
}
|
|
4692
4691
|
formDisabledCallback(disabled$LWS) {
|
|
4693
|
-
const definition$LWS = this.
|
|
4692
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4694
4693
|
const formDisabledCallback$LWS = definition$LWS && definition$LWS.formDisabledCallback;
|
|
4695
4694
|
if (formDisabledCallback$LWS) {
|
|
4696
4695
|
ReflectApply$LWS$1(formDisabledCallback$LWS, this, [disabled$LWS]);
|
|
4697
4696
|
}
|
|
4698
4697
|
}
|
|
4699
4698
|
formResetCallback() {
|
|
4700
|
-
const definition$LWS = this.
|
|
4699
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4701
4700
|
const formResetCallback$LWS = definition$LWS && definition$LWS.formResetCallback;
|
|
4702
4701
|
if (formResetCallback$LWS) {
|
|
4703
4702
|
ReflectApply$LWS$1(formResetCallback$LWS, this, []);
|
|
@@ -4705,7 +4704,7 @@ originalDefinition$LWS, tagName$LWS) {
|
|
|
4705
4704
|
}
|
|
4706
4705
|
// istanbul ignore next: currently unreachable via tests because the browser mechanics that would result in its execution cannot be simulated or reproduced.
|
|
4707
4706
|
formStateRestoreCallback(state$LWS, reason$LWS) {
|
|
4708
|
-
const definition$LWS = this.
|
|
4707
|
+
const definition$LWS = instanceRegistryMap$LWS.get(this).getDefinition(this);
|
|
4709
4708
|
const formStateRestoreCallback$LWS = definition$LWS && definition$LWS.formStateRestoreCallback;
|
|
4710
4709
|
if (formStateRestoreCallback$LWS) {
|
|
4711
4710
|
ReflectApply$LWS$1(formStateRestoreCallback$LWS, this, [state$LWS, reason$LWS]);
|
|
@@ -5861,6 +5860,9 @@ function initDistortionDocumentDomainSetter$LWS({
|
|
|
5861
5860
|
const {
|
|
5862
5861
|
isSharedElement: isSharedElement$r$LWS
|
|
5863
5862
|
} = rootValidator$LWS;
|
|
5863
|
+
function throwLockerSecurityError$LWS(command$LWS, target$LWS) {
|
|
5864
|
+
throw new LockerSecurityError$LWS(`Cannot execute command '${command$LWS}' on ${ReflectApply$LWS$1(NodeProtoNodeNameGetter$LWS, target$LWS, [])}.`);
|
|
5865
|
+
}
|
|
5864
5866
|
function initDistortionDocumentExecCommand$LWS({
|
|
5865
5867
|
document: document$LWS,
|
|
5866
5868
|
globalObject: {
|
|
@@ -5879,29 +5881,38 @@ function initDistortionDocumentExecCommand$LWS({
|
|
|
5879
5881
|
type: type$LWS
|
|
5880
5882
|
}) {
|
|
5881
5883
|
return [originalExecCommand$LWS, function execCommand$LWS(...args$LWS) {
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5884
|
+
const {
|
|
5885
|
+
length: length$LWS
|
|
5886
|
+
} = args$LWS;
|
|
5887
|
+
if (length$LWS >= 1) {
|
|
5888
|
+
const command$LWS = toString$LWS(args$LWS[0]);
|
|
5889
|
+
const loweredCommand$LWS = ReflectApply$LWS$1(StringProtoToLowerCase$LWS, command$LWS, []);
|
|
5890
|
+
if (length$LWS === 1 && loweredCommand$LWS === 'selectall' && this === rootDocument$LWS) {
|
|
5891
|
+
throwLockerSecurityError$LWS(command$LWS, this);
|
|
5892
|
+
}
|
|
5893
|
+
if (length$LWS > 2) {
|
|
5894
|
+
const {
|
|
5895
|
+
2: unsanitizedValue$LWS
|
|
5896
|
+
} = args$LWS;
|
|
5897
|
+
// istanbul ignore else: needs default platform behavior test
|
|
5898
|
+
if (unsanitizedValue$LWS !== null && unsanitizedValue$LWS !== undefined) {
|
|
5899
|
+
// istanbul ignore else: LWS does not test for all possible commands
|
|
5900
|
+
if (loweredCommand$LWS === 'inserthtml') {
|
|
5901
|
+
// istanbul ignore else: external is the default sandbox type for coverage runs
|
|
5902
|
+
if (type$LWS === 0 /* SandboxType.External */) {
|
|
5903
|
+
const activeElement$LWS = ReflectApply$LWS$1(originalActiveElement$LWS, this, []);
|
|
5904
|
+
if (isSharedElement$r$LWS(activeElement$LWS) && ReflectApply$LWS$1(originalIsContentEditable$LWS, activeElement$LWS, [])) {
|
|
5905
|
+
throwLockerSecurityError$LWS(command$LWS, activeElement$LWS);
|
|
5906
|
+
}
|
|
5896
5907
|
}
|
|
5908
|
+
// This must be called to signal to the virtual
|
|
5909
|
+
// CustomElementRegistry that the next thing created
|
|
5910
|
+
// MAY CONTAIN a custom element, which must be marked
|
|
5911
|
+
// for association to this sandbox.
|
|
5912
|
+
setCustomElementsRegistry$LWS(document$LWS, key$LWS);
|
|
5913
|
+
args$LWS[0] = command$LWS;
|
|
5914
|
+
args$LWS[2] = lwsInternalPolicy$LWS.createHTML(unsanitizedValue$LWS, key$LWS, ContentType$LWS.HTML);
|
|
5897
5915
|
}
|
|
5898
|
-
// This must be called to signal to the virtual
|
|
5899
|
-
// CustomElementRegistry that the next thing created
|
|
5900
|
-
// MAY CONTAIN a custom element, which must be marked
|
|
5901
|
-
// for association to this sandbox.
|
|
5902
|
-
setCustomElementsRegistry$LWS(document$LWS, key$LWS);
|
|
5903
|
-
args$LWS[0] = command$LWS;
|
|
5904
|
-
args$LWS[2] = lwsInternalPolicy$LWS.createHTML(unsanitizedValue$LWS, key$LWS, ContentType$LWS.HTML);
|
|
5905
5916
|
}
|
|
5906
5917
|
}
|
|
5907
5918
|
}
|
|
@@ -9862,8 +9873,8 @@ const HTMLElementBlockedProperties$LWS = ['nonce', 'onrejectionhandled', 'onunha
|
|
|
9862
9873
|
const HTMLEmbedElementBlockedProperties$LWS = ['getSVGDocument'];
|
|
9863
9874
|
|
|
9864
9875
|
// https://www.w3schools.com/tags/tag_iframe.asp
|
|
9865
|
-
const HTMLIFrameElementBlockedAttributes$LWS = ['
|
|
9866
|
-
const HTMLIFrameElementBlockedProperties$LWS = ['
|
|
9876
|
+
const HTMLIFrameElementBlockedAttributes$LWS = ['srcdoc'];
|
|
9877
|
+
const HTMLIFrameElementBlockedProperties$LWS = ['getSVGDocument', 'srcdoc'];
|
|
9867
9878
|
const HTMLObjectElementBlockedProperties$LWS = ['getSVGDocument'];
|
|
9868
9879
|
const HTMLScriptElementBlockedAttributes$LWS = ['nonce'];
|
|
9869
9880
|
const HTMLScriptElementBlockedProperties$LWS = ['nonce'];
|
|
@@ -9872,7 +9883,7 @@ const SVGElementBlockedProperties$LWS = ['nonce'];
|
|
|
9872
9883
|
const UIEventBlockedProperties$LWS = ['rangeParent'];
|
|
9873
9884
|
const WindowBlockedProperties$LWS = ['find'];
|
|
9874
9885
|
const XSLTProcessorBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
|
|
9875
|
-
/*! version: 0.20.
|
|
9886
|
+
/*! version: 0.20.5 */
|
|
9876
9887
|
|
|
9877
9888
|
/*!
|
|
9878
9889
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -15756,7 +15767,7 @@ function wrapPlatformResourceLoader$LWS(dep$LWS, key$LWS) {
|
|
|
15756
15767
|
depRegistry$LWS.set(dep$LWS, secureDep$LWS);
|
|
15757
15768
|
return secureDep$LWS;
|
|
15758
15769
|
}
|
|
15759
|
-
/*! version: 0.20.
|
|
15770
|
+
/*! version: 0.20.5 */
|
|
15760
15771
|
|
|
15761
15772
|
export { CORE_SANDBOX_KEY$LWS as CORE_SANDBOX_KEY, createRootWindowSandboxRecord$LWS as createRootWindowSandboxRecord, evaluateFunction$LWS as evaluateFunction, evaluateInCoreSandbox$LWS as evaluateInCoreSandbox, evaluateInSandbox$LWS as evaluateInSandbox, trusted, wrapDependency$LWS as wrapDependency };
|
|
15762
15773
|
//# sourceMappingURL=lockerSandbox.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.11.0-alpha.
|
|
7
|
+
"version": "0.11.0-alpha.13",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"build:platform": "node scripts/strip-for-core.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@locker/sandbox": "0.20.
|
|
37
|
-
"@lwrjs/shared-utils": "0.11.0-alpha.
|
|
36
|
+
"@locker/sandbox": "0.20.5",
|
|
37
|
+
"@lwrjs/shared-utils": "0.11.0-alpha.13"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.11.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.11.0-alpha.13",
|
|
41
41
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
42
42
|
"@rollup/plugin-sucrase": "^5.0.2",
|
|
43
43
|
"@rollup/plugin-terser": "^0.4.4",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"volta": {
|
|
70
70
|
"extends": "../../../package.json"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "101ac765e89de3b378b4c049cdeb0cfc635ae22a"
|
|
73
73
|
}
|