@lwrjs/client-modules 0.5.13 → 0.5.14
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.
|
@@ -25,7 +25,7 @@ const {
|
|
|
25
25
|
slice: ArrayProtoSlice,
|
|
26
26
|
some: ArrayProtoSome
|
|
27
27
|
} = Array.prototype;
|
|
28
|
-
const emptyArray
|
|
28
|
+
const emptyArray = [];
|
|
29
29
|
const ArrayCtor = Array;
|
|
30
30
|
const {
|
|
31
31
|
from: ArrayFrom,
|
|
@@ -68,7 +68,7 @@ function ArrayJoin(arr, ...args) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
function ArrayPop(arr) {
|
|
71
|
-
return ReflectApply$3(ArrayProtoPop, arr, emptyArray
|
|
71
|
+
return ReflectApply$3(ArrayProtoPop, arr, emptyArray);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function ArrayPush(arr, ...args) {
|
|
@@ -155,7 +155,7 @@ const {
|
|
|
155
155
|
__lookupGetter__: ObjectProto__lookupGetter__$1,
|
|
156
156
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
157
157
|
__lookupSetter__: ObjectProto__lookupSetter__,
|
|
158
|
-
hasOwnProperty: ObjectProtoHasOwnProperty
|
|
158
|
+
hasOwnProperty: ObjectProtoHasOwnProperty
|
|
159
159
|
} = Object.prototype;
|
|
160
160
|
const {
|
|
161
161
|
assign: ObjectAssign$3,
|
|
@@ -174,11 +174,11 @@ const {
|
|
|
174
174
|
} = Object;
|
|
175
175
|
|
|
176
176
|
function ObjectHasOwnProperty(obj, key) {
|
|
177
|
-
return obj !== null && obj !== undefined && ReflectApply$3(ObjectProtoHasOwnProperty
|
|
177
|
+
return obj !== null && obj !== undefined && ReflectApply$3(ObjectProtoHasOwnProperty, obj, [key]);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
function ObjectLookupOwnGetter
|
|
181
|
-
if (obj === null || obj === undefined || !ReflectApply$3(ObjectProtoHasOwnProperty
|
|
180
|
+
function ObjectLookupOwnGetter(obj, key) {
|
|
181
|
+
if (obj === null || obj === undefined || !ReflectApply$3(ObjectProtoHasOwnProperty, obj, [key])) {
|
|
182
182
|
return undefined;
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -186,7 +186,7 @@ function ObjectLookupOwnGetter$1(obj, key) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
function ObjectLookupOwnSetter(obj, key) {
|
|
189
|
-
if (obj === null || obj === undefined || !ReflectApply$3(ObjectProtoHasOwnProperty
|
|
189
|
+
if (obj === null || obj === undefined || !ReflectApply$3(ObjectProtoHasOwnProperty, obj, [key])) {
|
|
190
190
|
return undefined;
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -194,7 +194,7 @@ function ObjectLookupOwnSetter(obj, key) {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
function ObjectLookupOwnValue(obj, key) {
|
|
197
|
-
if (obj === null || obj === undefined || !ReflectApply$3(ObjectProtoHasOwnProperty
|
|
197
|
+
if (obj === null || obj === undefined || !ReflectApply$3(ObjectProtoHasOwnProperty, obj, [key])) {
|
|
198
198
|
return undefined;
|
|
199
199
|
}
|
|
200
200
|
|
|
@@ -309,7 +309,7 @@ const {
|
|
|
309
309
|
const MapCtor = Map;
|
|
310
310
|
|
|
311
311
|
function MapEntries(map) {
|
|
312
|
-
return ReflectApply$3(MapProtoEntries, map, emptyArray
|
|
312
|
+
return ReflectApply$3(MapProtoEntries, map, emptyArray);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
function MapForEach(map, iteratee) {
|
|
@@ -434,7 +434,7 @@ function sanitizeArguments(args, sanitizers) {
|
|
|
434
434
|
const {
|
|
435
435
|
add: SetProtoAdd,
|
|
436
436
|
delete: SetProtoDelete,
|
|
437
|
-
has: SetProtoHas
|
|
437
|
+
has: SetProtoHas
|
|
438
438
|
} = Set.prototype;
|
|
439
439
|
const SetCtor = Set;
|
|
440
440
|
|
|
@@ -447,7 +447,7 @@ function SetDelete(set, value) {
|
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
function SetHas(set, value) {
|
|
450
|
-
return ReflectApply$3(SetProtoHas
|
|
450
|
+
return ReflectApply$3(SetProtoHas, set, [value]);
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
const {
|
|
@@ -463,33 +463,33 @@ function WeakMapGet(weakMap, key) {
|
|
|
463
463
|
function WeakMapSet(weakMap, key, value) {
|
|
464
464
|
return ReflectApply$3(WeakMapProtoSet$1, weakMap, [key, value]);
|
|
465
465
|
}
|
|
466
|
-
/*! version: 0.14.
|
|
466
|
+
/*! version: 0.14.28 */
|
|
467
467
|
|
|
468
468
|
/*!
|
|
469
469
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
470
470
|
*/
|
|
471
|
-
const AttrProtoNameGetter = ObjectLookupOwnGetter
|
|
472
|
-
const AttrProtoNamespaceURIGetter = ObjectLookupOwnGetter
|
|
473
|
-
const AttrProtoOwnerElementGetter = ObjectLookupOwnGetter
|
|
471
|
+
const AttrProtoNameGetter = ObjectLookupOwnGetter(Attr.prototype, 'name');
|
|
472
|
+
const AttrProtoNamespaceURIGetter = ObjectLookupOwnGetter(Attr.prototype, 'namespaceURI');
|
|
473
|
+
const AttrProtoOwnerElementGetter = ObjectLookupOwnGetter(Attr.prototype, 'ownerElement');
|
|
474
474
|
const {
|
|
475
475
|
get: AttrProtoValueGetter,
|
|
476
476
|
set: AttrProtoValueSetter
|
|
477
477
|
} = ReflectGetOwnPropertyDescriptor$1(Attr.prototype, 'value');
|
|
478
478
|
|
|
479
479
|
function AttrNameGetter(attr) {
|
|
480
|
-
return ReflectApply$3(AttrProtoNameGetter, attr, emptyArray
|
|
480
|
+
return ReflectApply$3(AttrProtoNameGetter, attr, emptyArray);
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
function AttrNamespaceURIGetter(attr) {
|
|
484
|
-
return ReflectApply$3(AttrProtoNamespaceURIGetter, attr, emptyArray
|
|
484
|
+
return ReflectApply$3(AttrProtoNamespaceURIGetter, attr, emptyArray);
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
function AttrOwnerElementGetter(attr) {
|
|
488
|
-
return ReflectApply$3(AttrProtoOwnerElementGetter, attr, emptyArray
|
|
488
|
+
return ReflectApply$3(AttrProtoOwnerElementGetter, attr, emptyArray);
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
function AttrValueGetter(attr) {
|
|
492
|
-
return ReflectApply$3(AttrProtoValueGetter, attr, emptyArray
|
|
492
|
+
return ReflectApply$3(AttrProtoValueGetter, attr, emptyArray);
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
function AttrValueSetter(attr, value) {
|
|
@@ -534,20 +534,20 @@ const {
|
|
|
534
534
|
createElementNS: DocumentProtoCreateElementNS,
|
|
535
535
|
getElementById: DocumentProtoGetElementById
|
|
536
536
|
} = Document.prototype;
|
|
537
|
-
const DocumentProtoBodyGetter$1 = ObjectLookupOwnGetter
|
|
538
|
-
const DocumentProtoDocumentElementGetter = ObjectLookupOwnGetter
|
|
539
|
-
const DocumentProtoHeadGetter = ObjectLookupOwnGetter
|
|
540
|
-
const DocumentProtoImplementationGetter = ObjectLookupOwnGetter
|
|
537
|
+
const DocumentProtoBodyGetter$1 = ObjectLookupOwnGetter(Document.prototype, 'body');
|
|
538
|
+
const DocumentProtoDocumentElementGetter = ObjectLookupOwnGetter(Document.prototype, 'documentElement');
|
|
539
|
+
const DocumentProtoHeadGetter = ObjectLookupOwnGetter(Document.prototype, 'head');
|
|
540
|
+
const DocumentProtoImplementationGetter = ObjectLookupOwnGetter(Document.prototype, 'implementation');
|
|
541
541
|
const {
|
|
542
542
|
execCommand: DocumentProtoExecCommand
|
|
543
543
|
} = Document.prototype;
|
|
544
544
|
|
|
545
545
|
function DocumentBodyGetter(doc) {
|
|
546
|
-
return ReflectApply$3(DocumentProtoBodyGetter$1, doc, emptyArray
|
|
546
|
+
return ReflectApply$3(DocumentProtoBodyGetter$1, doc, emptyArray);
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
function DocumentCookieGetter(doc) {
|
|
550
|
-
return ReflectApply$3(DocumentProtoCookieGetter, doc, emptyArray
|
|
550
|
+
return ReflectApply$3(DocumentProtoCookieGetter, doc, emptyArray);
|
|
551
551
|
}
|
|
552
552
|
|
|
553
553
|
function DocumentCookieSetter(doc, newCookie) {
|
|
@@ -555,7 +555,7 @@ function DocumentCookieSetter(doc, newCookie) {
|
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
function DocumentImplementation(doc) {
|
|
558
|
-
return ReflectApply$3(DocumentProtoImplementationGetter, doc, emptyArray
|
|
558
|
+
return ReflectApply$3(DocumentProtoImplementationGetter, doc, emptyArray);
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
function DocumentCreateComment(doc, data = '') {
|
|
@@ -571,7 +571,7 @@ function DocumentCreateElementNS(doc, ...args) {
|
|
|
571
571
|
}
|
|
572
572
|
|
|
573
573
|
function DocumentDocumentElementGetter(doc) {
|
|
574
|
-
return ReflectApply$3(DocumentProtoDocumentElementGetter, doc, emptyArray
|
|
574
|
+
return ReflectApply$3(DocumentProtoDocumentElementGetter, doc, emptyArray);
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
function DocumentGetElementById(doc, id) {
|
|
@@ -579,7 +579,7 @@ function DocumentGetElementById(doc, id) {
|
|
|
579
579
|
}
|
|
580
580
|
|
|
581
581
|
function DocumentHeadGetter(doc) {
|
|
582
|
-
return ReflectApply$3(DocumentProtoHeadGetter, doc, emptyArray
|
|
582
|
+
return ReflectApply$3(DocumentProtoHeadGetter, doc, emptyArray);
|
|
583
583
|
}
|
|
584
584
|
|
|
585
585
|
function nsCookieKey(key, ns) {
|
|
@@ -613,15 +613,15 @@ const {
|
|
|
613
613
|
get: ElementProtoOuterHTMLGetter,
|
|
614
614
|
set: ElementProtoOuterHTMLSetter
|
|
615
615
|
} = ReflectGetOwnPropertyDescriptor$1(Element.prototype, 'outerHTML');
|
|
616
|
-
const ElementProtoAttributesGetter = ObjectLookupOwnGetter
|
|
617
|
-
const ElementProtoGetNamespaceURI = ObjectLookupOwnGetter
|
|
616
|
+
const ElementProtoAttributesGetter = ObjectLookupOwnGetter(Element.prototype, 'attributes');
|
|
617
|
+
const ElementProtoGetNamespaceURI = ObjectLookupOwnGetter(Element.prototype, 'namespaceURI');
|
|
618
618
|
|
|
619
619
|
function ElementClosest(el, selectors) {
|
|
620
620
|
return ReflectApply$3(ElementProtoClosest, el, [selectors]);
|
|
621
621
|
}
|
|
622
622
|
|
|
623
623
|
function ElementInnerHTMLGetter(el) {
|
|
624
|
-
return ReflectApply$3(ElementProtoInnerHTMLGetter, el, emptyArray
|
|
624
|
+
return ReflectApply$3(ElementProtoInnerHTMLGetter, el, emptyArray);
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
function ElementInnerHTMLSetter(el, html) {
|
|
@@ -629,7 +629,7 @@ function ElementInnerHTMLSetter(el, html) {
|
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
function ElementOuterHTMLGetter(el) {
|
|
632
|
-
return ReflectApply$3(ElementProtoOuterHTMLGetter, el, emptyArray
|
|
632
|
+
return ReflectApply$3(ElementProtoOuterHTMLGetter, el, emptyArray);
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
function ElementOuterHTMLSetter(el, html) {
|
|
@@ -641,7 +641,7 @@ function ElementQuerySelector(el, selectors) {
|
|
|
641
641
|
}
|
|
642
642
|
|
|
643
643
|
function ElementAttributesGetter(el) {
|
|
644
|
-
return ReflectApply$3(ElementProtoAttributesGetter, el, emptyArray
|
|
644
|
+
return ReflectApply$3(ElementProtoAttributesGetter, el, emptyArray);
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
function ElementGetAttributeNode(el, attrName) {
|
|
@@ -653,7 +653,7 @@ function ElementGetAttributeNodeNS(el, namespace, nodeName) {
|
|
|
653
653
|
}
|
|
654
654
|
|
|
655
655
|
function ElementRemove$1(el) {
|
|
656
|
-
return ReflectApply$3(ElementProtoRemove$1, el, emptyArray
|
|
656
|
+
return ReflectApply$3(ElementProtoRemove$1, el, emptyArray);
|
|
657
657
|
}
|
|
658
658
|
|
|
659
659
|
function ElementRemoveAttributeNode(el, attrNode) {
|
|
@@ -677,13 +677,13 @@ function ElementSetAttributeNS(el, namespace, name, value) {
|
|
|
677
677
|
}
|
|
678
678
|
|
|
679
679
|
function ElementGetNamespaceURI(el) {
|
|
680
|
-
return ReflectApply$3(ElementProtoGetNamespaceURI, el, emptyArray
|
|
680
|
+
return ReflectApply$3(ElementProtoGetNamespaceURI, el, emptyArray);
|
|
681
681
|
}
|
|
682
682
|
|
|
683
|
-
const HTMLTemplateElementProtoContentGetter = ObjectLookupOwnGetter
|
|
683
|
+
const HTMLTemplateElementProtoContentGetter = ObjectLookupOwnGetter(HTMLTemplateElement.prototype, 'content');
|
|
684
684
|
|
|
685
685
|
function HTMLTemplateElementContentGetter(template) {
|
|
686
|
-
return ReflectApply$3(HTMLTemplateElementProtoContentGetter, template, emptyArray
|
|
686
|
+
return ReflectApply$3(HTMLTemplateElementProtoContentGetter, template, emptyArray);
|
|
687
687
|
}
|
|
688
688
|
|
|
689
689
|
const {
|
|
@@ -691,11 +691,11 @@ const {
|
|
|
691
691
|
cloneNode: NodeProtoCloneNode,
|
|
692
692
|
isEqualNode: NodeProtoIsEqualNode
|
|
693
693
|
} = Node.prototype;
|
|
694
|
-
const NodeProtoChildNodesGetter = ObjectLookupOwnGetter
|
|
695
|
-
const NodeProtoFirstChildGetter = ObjectLookupOwnGetter
|
|
696
|
-
const NodeProtoLastChildGetter$1 = ObjectLookupOwnGetter
|
|
697
|
-
const NodeProtoNodeNameGetter = ObjectLookupOwnGetter
|
|
698
|
-
const NodeProtoOwnerDocumentGetter = ObjectLookupOwnGetter
|
|
694
|
+
const NodeProtoChildNodesGetter = ObjectLookupOwnGetter(Node.prototype, 'childNodes');
|
|
695
|
+
const NodeProtoFirstChildGetter = ObjectLookupOwnGetter(Node.prototype, 'firstChild');
|
|
696
|
+
const NodeProtoLastChildGetter$1 = ObjectLookupOwnGetter(Node.prototype, 'lastChild');
|
|
697
|
+
const NodeProtoNodeNameGetter = ObjectLookupOwnGetter(Node.prototype, 'nodeName');
|
|
698
|
+
const NodeProtoOwnerDocumentGetter = ObjectLookupOwnGetter(Node.prototype, 'ownerDocument');
|
|
699
699
|
const NodeProtoTextContentSetter = ObjectLookupOwnSetter(Node.prototype, 'textContent');
|
|
700
700
|
|
|
701
701
|
function NodeAppendChild$1(node, childNode) {
|
|
@@ -703,7 +703,7 @@ function NodeAppendChild$1(node, childNode) {
|
|
|
703
703
|
}
|
|
704
704
|
|
|
705
705
|
function NodeChildNodesGetter(node) {
|
|
706
|
-
return ReflectApply$3(NodeProtoChildNodesGetter, node, emptyArray
|
|
706
|
+
return ReflectApply$3(NodeProtoChildNodesGetter, node, emptyArray);
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
function NodeClone(node, deep = false) {
|
|
@@ -711,7 +711,7 @@ function NodeClone(node, deep = false) {
|
|
|
711
711
|
}
|
|
712
712
|
|
|
713
713
|
function NodeFirstChildGetter(node) {
|
|
714
|
-
return ReflectApply$3(NodeProtoFirstChildGetter, node, emptyArray
|
|
714
|
+
return ReflectApply$3(NodeProtoFirstChildGetter, node, emptyArray);
|
|
715
715
|
}
|
|
716
716
|
|
|
717
717
|
function NodeIsEqualNode(node, otherNode) {
|
|
@@ -719,17 +719,17 @@ function NodeIsEqualNode(node, otherNode) {
|
|
|
719
719
|
}
|
|
720
720
|
|
|
721
721
|
function NodeLastChildGetter(node) {
|
|
722
|
-
return ReflectApply$3(NodeProtoLastChildGetter$1, node, emptyArray
|
|
722
|
+
return ReflectApply$3(NodeProtoLastChildGetter$1, node, emptyArray);
|
|
723
723
|
}
|
|
724
724
|
|
|
725
725
|
function NodeNameGetter(node) {
|
|
726
726
|
// Normalize nodeName to upper case.
|
|
727
727
|
// See https://johnresig.com/blog/nodename-case-sensitivity/.
|
|
728
|
-
return StringToUpperCase(ReflectApply$3(NodeProtoNodeNameGetter, node, emptyArray
|
|
728
|
+
return StringToUpperCase(ReflectApply$3(NodeProtoNodeNameGetter, node, emptyArray));
|
|
729
729
|
}
|
|
730
730
|
|
|
731
731
|
function NodeOwnerDocumentGetter(node) {
|
|
732
|
-
return ReflectApply$3(NodeProtoOwnerDocumentGetter, node, emptyArray
|
|
732
|
+
return ReflectApply$3(NodeProtoOwnerDocumentGetter, node, emptyArray);
|
|
733
733
|
}
|
|
734
734
|
|
|
735
735
|
function NodeTextContentSetter(node, textContent) {
|
|
@@ -825,15 +825,15 @@ function JSONClone(value) {
|
|
|
825
825
|
return JSONParse(JSONStringify(value));
|
|
826
826
|
}
|
|
827
827
|
|
|
828
|
-
const BlobProtoSizeGetter = ObjectLookupOwnGetter
|
|
828
|
+
const BlobProtoSizeGetter = ObjectLookupOwnGetter(Blob.prototype, 'size');
|
|
829
829
|
const {
|
|
830
830
|
slice: BlobProtoSlice
|
|
831
831
|
} = Blob.prototype;
|
|
832
|
-
const BlobProtoTypeGetter = ObjectLookupOwnGetter
|
|
832
|
+
const BlobProtoTypeGetter = ObjectLookupOwnGetter(Blob.prototype, 'type');
|
|
833
833
|
const BlobCtor = Blob;
|
|
834
834
|
|
|
835
835
|
function BlobSizeGetter(blob) {
|
|
836
|
-
return ReflectApply$3(BlobProtoSizeGetter, blob, emptyArray
|
|
836
|
+
return ReflectApply$3(BlobProtoSizeGetter, blob, emptyArray);
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
function BlobSlice(blob, ...args) {
|
|
@@ -841,7 +841,7 @@ function BlobSlice(blob, ...args) {
|
|
|
841
841
|
}
|
|
842
842
|
|
|
843
843
|
function BlobTypeGetter(blob) {
|
|
844
|
-
return StringToLowerCase(ReflectApply$3(BlobProtoTypeGetter, blob, emptyArray
|
|
844
|
+
return StringToLowerCase(ReflectApply$3(BlobProtoTypeGetter, blob, emptyArray));
|
|
845
845
|
}
|
|
846
846
|
|
|
847
847
|
const CookieStoreProto = typeof CookieStore === 'undefined' ? undefined :
|
|
@@ -880,19 +880,19 @@ function DOMImplementationCreateDocument(domImplementation, ...args) {
|
|
|
880
880
|
const {
|
|
881
881
|
parseFromString: DOMParserProtoParseFromString
|
|
882
882
|
} = DOMParser.prototype;
|
|
883
|
-
const DOMTokenListProtoValueGetter = ObjectLookupOwnGetter
|
|
883
|
+
const DOMTokenListProtoValueGetter = ObjectLookupOwnGetter(DOMTokenList.prototype, 'value');
|
|
884
884
|
|
|
885
885
|
function DOMTokenListValueGetter(tokenList) {
|
|
886
|
-
return ReflectApply$3(DOMTokenListProtoValueGetter, tokenList, emptyArray
|
|
886
|
+
return ReflectApply$3(DOMTokenListProtoValueGetter, tokenList, emptyArray);
|
|
887
887
|
}
|
|
888
888
|
|
|
889
889
|
const {
|
|
890
890
|
composedPath: EventProtoComposedPath
|
|
891
891
|
} = Event.prototype;
|
|
892
|
-
const EventProtoCurrentTargetGetter = ObjectLookupOwnGetter
|
|
892
|
+
const EventProtoCurrentTargetGetter = ObjectLookupOwnGetter(Event.prototype, 'currentTarget');
|
|
893
893
|
|
|
894
894
|
function EventCurrentTargetGetter(event) {
|
|
895
|
-
return ReflectApply$3(EventProtoCurrentTargetGetter, event, emptyArray
|
|
895
|
+
return ReflectApply$3(EventProtoCurrentTargetGetter, event, emptyArray);
|
|
896
896
|
}
|
|
897
897
|
|
|
898
898
|
const {
|
|
@@ -903,20 +903,20 @@ function EventTargetAddEventListener(target, ...args) {
|
|
|
903
903
|
return ReflectApply$3(EventTargetProtoAddEventListener, target, args);
|
|
904
904
|
}
|
|
905
905
|
|
|
906
|
-
const HTMLAnchorElementProtoHostnameGetter = ObjectLookupOwnGetter
|
|
906
|
+
const HTMLAnchorElementProtoHostnameGetter = ObjectLookupOwnGetter(HTMLAnchorElement.prototype, 'hostname');
|
|
907
907
|
const {
|
|
908
908
|
get: HTMLAnchorElementProtoHrefGetter,
|
|
909
909
|
set: HTMLAnchorElementProtoHrefSetter
|
|
910
910
|
} = ReflectGetOwnPropertyDescriptor$1(HTMLAnchorElement.prototype, 'href');
|
|
911
|
-
const HTMLAnchorElementProtoPathnameGetter = ObjectLookupOwnGetter
|
|
912
|
-
const HTMLAnchorElementProtoProtocolGetter = ObjectLookupOwnGetter
|
|
911
|
+
const HTMLAnchorElementProtoPathnameGetter = ObjectLookupOwnGetter(HTMLAnchorElement.prototype, 'pathname');
|
|
912
|
+
const HTMLAnchorElementProtoProtocolGetter = ObjectLookupOwnGetter(HTMLAnchorElement.prototype, 'protocol');
|
|
913
913
|
|
|
914
914
|
function HTMLAnchorElementHostnameGetter(anchor) {
|
|
915
|
-
return ReflectApply$3(HTMLAnchorElementProtoHostnameGetter, anchor, emptyArray
|
|
915
|
+
return ReflectApply$3(HTMLAnchorElementProtoHostnameGetter, anchor, emptyArray);
|
|
916
916
|
}
|
|
917
917
|
|
|
918
918
|
function HTMLAnchorElementHrefGetter(anchor) {
|
|
919
|
-
return ReflectApply$3(HTMLAnchorElementProtoHrefGetter, anchor, emptyArray
|
|
919
|
+
return ReflectApply$3(HTMLAnchorElementProtoHrefGetter, anchor, emptyArray);
|
|
920
920
|
}
|
|
921
921
|
|
|
922
922
|
function HTMLAnchorElementHrefSetter(anchor, href) {
|
|
@@ -924,21 +924,21 @@ function HTMLAnchorElementHrefSetter(anchor, href) {
|
|
|
924
924
|
}
|
|
925
925
|
|
|
926
926
|
function HTMLAnchorElementPathnameGetter(anchor) {
|
|
927
|
-
return ReflectApply$3(HTMLAnchorElementProtoPathnameGetter, anchor, emptyArray
|
|
927
|
+
return ReflectApply$3(HTMLAnchorElementProtoPathnameGetter, anchor, emptyArray);
|
|
928
928
|
}
|
|
929
929
|
|
|
930
930
|
function HTMLAnchorElementProtocolGetter(anchor) {
|
|
931
|
-
return ReflectApply$3(HTMLAnchorElementProtoProtocolGetter, anchor, emptyArray
|
|
931
|
+
return ReflectApply$3(HTMLAnchorElementProtoProtocolGetter, anchor, emptyArray);
|
|
932
932
|
} // The innerText and outerText setters may be undefined.
|
|
933
933
|
|
|
934
934
|
|
|
935
935
|
const HTMLElementProtoInnerTextSetter = ObjectLookupOwnSetter(HTMLElement.prototype, 'innerText');
|
|
936
936
|
const HTMLElementProtoOuterTextSetter = ObjectLookupOwnSetter(HTMLElement.prototype, 'outerText');
|
|
937
|
-
const HTMLElementProtoDatasetGetter = ObjectLookupOwnGetter
|
|
938
|
-
const HTMLElementProtoStyleGetter$1 = ObjectLookupOwnGetter
|
|
937
|
+
const HTMLElementProtoDatasetGetter = ObjectLookupOwnGetter(HTMLElement.prototype, 'dataset');
|
|
938
|
+
const HTMLElementProtoStyleGetter$1 = ObjectLookupOwnGetter(HTMLElement.prototype, 'style');
|
|
939
939
|
|
|
940
940
|
function HTMLElementDatasetGetter(el) {
|
|
941
|
-
return ReflectApply$3(HTMLElementProtoDatasetGetter, el, emptyArray
|
|
941
|
+
return ReflectApply$3(HTMLElementProtoDatasetGetter, el, emptyArray);
|
|
942
942
|
}
|
|
943
943
|
|
|
944
944
|
const HTMLElementInnerTextSetter = HTMLElementProtoInnerTextSetter ? function HTMLElementInnerTextSetter(el, text) {
|
|
@@ -953,30 +953,30 @@ const HTMLElementOuterTextSetter = HTMLElementProtoOuterTextSetter ? function HT
|
|
|
953
953
|
function HTMLElementOuterTextSetter(_el, _text) {};
|
|
954
954
|
|
|
955
955
|
function HTMLElementStyleGetter$1(el) {
|
|
956
|
-
return ReflectApply$3(HTMLElementProtoStyleGetter$1, el, emptyArray
|
|
956
|
+
return ReflectApply$3(HTMLElementProtoStyleGetter$1, el, emptyArray);
|
|
957
957
|
}
|
|
958
958
|
|
|
959
|
-
const HTMLFrameElementProtoContentDocumentGetter = ObjectLookupOwnGetter
|
|
960
|
-
const HTMLFrameElementProtoContentWindowGetter = ObjectLookupOwnGetter
|
|
959
|
+
const HTMLFrameElementProtoContentDocumentGetter = ObjectLookupOwnGetter(HTMLFrameElement.prototype, 'contentDocument');
|
|
960
|
+
const HTMLFrameElementProtoContentWindowGetter = ObjectLookupOwnGetter(HTMLFrameElement.prototype, 'contentWindow');
|
|
961
961
|
|
|
962
962
|
function HTMLFrameElementContentDocumentGetter(frame) {
|
|
963
|
-
return ReflectApply$3(HTMLFrameElementProtoContentDocumentGetter, frame, emptyArray
|
|
963
|
+
return ReflectApply$3(HTMLFrameElementProtoContentDocumentGetter, frame, emptyArray);
|
|
964
964
|
}
|
|
965
965
|
|
|
966
966
|
function HTMLFrameElementContentWindowGetter(frame) {
|
|
967
|
-
return ReflectApply$3(HTMLFrameElementProtoContentWindowGetter, frame, emptyArray
|
|
967
|
+
return ReflectApply$3(HTMLFrameElementProtoContentWindowGetter, frame, emptyArray);
|
|
968
968
|
}
|
|
969
969
|
|
|
970
|
-
const HTMLIFrameElementProtoContentDocumentGetter = ObjectLookupOwnGetter
|
|
971
|
-
const HTMLIFrameElementProtoContentWindowGetter$1 = ObjectLookupOwnGetter
|
|
970
|
+
const HTMLIFrameElementProtoContentDocumentGetter = ObjectLookupOwnGetter(HTMLIFrameElement.prototype, 'contentDocument');
|
|
971
|
+
const HTMLIFrameElementProtoContentWindowGetter$1 = ObjectLookupOwnGetter(HTMLIFrameElement.prototype, 'contentWindow');
|
|
972
972
|
const HTMLIFrameElementProtoSrcSetter = ObjectLookupOwnSetter(HTMLIFrameElement.prototype, 'src');
|
|
973
973
|
|
|
974
974
|
function HTMLIFrameElementContentDocumentGetter(iframe) {
|
|
975
|
-
return ReflectApply$3(HTMLIFrameElementProtoContentDocumentGetter, iframe, emptyArray
|
|
975
|
+
return ReflectApply$3(HTMLIFrameElementProtoContentDocumentGetter, iframe, emptyArray);
|
|
976
976
|
}
|
|
977
977
|
|
|
978
978
|
function HTMLIFrameElementContentWindowGetter$1(iframe) {
|
|
979
|
-
return ReflectApply$3(HTMLIFrameElementProtoContentWindowGetter$1, iframe, emptyArray
|
|
979
|
+
return ReflectApply$3(HTMLIFrameElementProtoContentWindowGetter$1, iframe, emptyArray);
|
|
980
980
|
}
|
|
981
981
|
|
|
982
982
|
function HTMLIFrameElementSrcSetter(iframe, src) {
|
|
@@ -994,17 +994,17 @@ function HTMLLinkElementRelListSetter(link, relList) {
|
|
|
994
994
|
ReflectApply$3(HTMLLinkElementProtoRelListSetter, link, [relList]);
|
|
995
995
|
}
|
|
996
996
|
|
|
997
|
-
const HTMLObjectProtoContentDocumentGetter = ObjectLookupOwnGetter
|
|
998
|
-
const HTMLObjectElementProtoContentWindowGetter = ObjectLookupOwnGetter
|
|
997
|
+
const HTMLObjectProtoContentDocumentGetter = ObjectLookupOwnGetter(HTMLObjectElement.prototype, 'contentDocument');
|
|
998
|
+
const HTMLObjectElementProtoContentWindowGetter = ObjectLookupOwnGetter(HTMLObjectElement.prototype, 'contentWindow');
|
|
999
999
|
|
|
1000
1000
|
function HTMLObjectElementContentDocumentGetter(objectEl) {
|
|
1001
|
-
return ReflectApply$3(HTMLObjectProtoContentDocumentGetter, objectEl, emptyArray
|
|
1001
|
+
return ReflectApply$3(HTMLObjectProtoContentDocumentGetter, objectEl, emptyArray);
|
|
1002
1002
|
} // contentWindow is not supported on object elements in iOS < 13.
|
|
1003
1003
|
// https://caniuse.com/mdn-api_htmlobjectelement_contentwindow
|
|
1004
1004
|
|
|
1005
1005
|
|
|
1006
1006
|
const HTMLObjectElementContentWindowGetter = HTMLObjectElementProtoContentWindowGetter ? function HTMLObjectElementContentWindowGetter(objectEl) {
|
|
1007
|
-
return ReflectApply$3(HTMLObjectElementProtoContentWindowGetter, objectEl, emptyArray
|
|
1007
|
+
return ReflectApply$3(HTMLObjectElementProtoContentWindowGetter, objectEl, emptyArray);
|
|
1008
1008
|
} :
|
|
1009
1009
|
/* istanbul ignore next: safely ignorable fallback */
|
|
1010
1010
|
function HTMLObjectElementContentWindowGetter(_objectEl) {
|
|
@@ -1014,10 +1014,10 @@ const {
|
|
|
1014
1014
|
get: HTMLScriptElementProtoSrcGetter,
|
|
1015
1015
|
set: HTMLScriptElementProtoSrcSetter
|
|
1016
1016
|
} = ReflectGetOwnPropertyDescriptor$1(HTMLScriptElement.prototype, 'src');
|
|
1017
|
-
const MessageEventProtoSourceGetter = ObjectLookupOwnGetter
|
|
1017
|
+
const MessageEventProtoSourceGetter = ObjectLookupOwnGetter(MessageEvent.prototype, 'source');
|
|
1018
1018
|
|
|
1019
1019
|
function MessageEventSourceGetter(messageEvent) {
|
|
1020
|
-
return ReflectApply$3(MessageEventProtoSourceGetter, messageEvent, emptyArray
|
|
1020
|
+
return ReflectApply$3(MessageEventProtoSourceGetter, messageEvent, emptyArray);
|
|
1021
1021
|
}
|
|
1022
1022
|
const NAMESPACE_DEFAULT = 'default';
|
|
1023
1023
|
const NAMESPACE_SVG = 'http://www.w3.org/2000/svg';
|
|
@@ -1026,12 +1026,12 @@ const NAMESPACE_XLINK = 'http://www.w3.org/1999/xlink';
|
|
|
1026
1026
|
const {
|
|
1027
1027
|
createContextualFragment: RangeProtoCreateContextualFragment
|
|
1028
1028
|
} = Range.prototype;
|
|
1029
|
-
const RequestProtoURLGetter = ObjectLookupOwnGetter
|
|
1029
|
+
const RequestProtoURLGetter = ObjectLookupOwnGetter(Request.prototype, 'url'); // This has to be done 1-by-1 because putting a full file ignore in this file will result in
|
|
1030
1030
|
// dist/index.js containing the directive and subsequently being ignored.
|
|
1031
1031
|
// istanbul ignore next
|
|
1032
1032
|
|
|
1033
1033
|
function RequestURLGetter(request) {
|
|
1034
|
-
return ReflectApply$3(RequestProtoURLGetter, request, emptyArray
|
|
1034
|
+
return ReflectApply$3(RequestProtoURLGetter, request, emptyArray);
|
|
1035
1035
|
}
|
|
1036
1036
|
|
|
1037
1037
|
const {
|
|
@@ -1071,10 +1071,10 @@ const HAS_BREAKABLE_CSS_STYLE_DECLARATION_MAGIC_OBJECT = (() => {
|
|
|
1071
1071
|
return div.getAttribute('style') === '';
|
|
1072
1072
|
})();
|
|
1073
1073
|
|
|
1074
|
-
const SVGElementProtoDatasetGetter = ObjectLookupOwnGetter
|
|
1074
|
+
const SVGElementProtoDatasetGetter = ObjectLookupOwnGetter(SVGElement.prototype, 'dataset');
|
|
1075
1075
|
|
|
1076
1076
|
function SVGElementDatasetGetter(svg) {
|
|
1077
|
-
return ReflectApply$3(SVGElementProtoDatasetGetter, svg, emptyArray
|
|
1077
|
+
return ReflectApply$3(SVGElementProtoDatasetGetter, svg, emptyArray);
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
1080
|
const {
|
|
@@ -1084,32 +1084,11 @@ const {
|
|
|
1084
1084
|
const ALLOW_LIST_PATCHED = ['opener', 'parent'];
|
|
1085
1085
|
const ALLOW_LIST_RAW = ['close', 'closed', 'focus'];
|
|
1086
1086
|
const DEFAULT_OVERWRITTEN_VALUE = {};
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
const
|
|
1091
|
-
const
|
|
1092
|
-
const WindowStaticParentGetter = ObjectLookupOwnGetter$1(window, 'parent');
|
|
1093
|
-
const WindowStaticPostMessageValue = ObjectLookupOwnValue(window, 'postMessage');
|
|
1094
|
-
const WindowStaticSelfGetter = ObjectLookupOwnGetter$1(window, 'self');
|
|
1095
|
-
const patchedWindowMap = new WeakMapCtor(); // NOTE: Currently, only used for "postMessage" to unwrap plain objects and primitives.
|
|
1096
|
-
// This is a temporary fix that would remove classes, functions, callbacks, etc.
|
|
1097
|
-
|
|
1098
|
-
function patchedWindowPostMessageValue(...args) {
|
|
1099
|
-
const message = args.length ? args[0] : undefined;
|
|
1100
|
-
|
|
1101
|
-
if (isObject(message)) {
|
|
1102
|
-
try {
|
|
1103
|
-
args[0] = JSONClone(message);
|
|
1104
|
-
} catch (_unused) {
|
|
1105
|
-
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
|
1106
|
-
throw new DOMException('The object could not be cloned.');
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
return ReflectApply$3(WindowStaticPostMessageValue, this, args);
|
|
1111
|
-
} // istanbul ignore next
|
|
1112
|
-
|
|
1087
|
+
const WindowStaticLengthGetter = ObjectLookupOwnGetter(window, 'length');
|
|
1088
|
+
const WindowStaticOpenerGetter = ObjectLookupOwnGetter(window, 'opener');
|
|
1089
|
+
const WindowStaticParentGetter = ObjectLookupOwnGetter(window, 'parent');
|
|
1090
|
+
const WindowStaticSelfGetter = ObjectLookupOwnGetter(window, 'self');
|
|
1091
|
+
const patchedWindowMap = new WeakMapCtor(); // istanbul ignore next
|
|
1113
1092
|
|
|
1114
1093
|
function createPatchedWindow(rawWindow) {
|
|
1115
1094
|
const patchedWindow = {};
|
|
@@ -1142,7 +1121,7 @@ function createPatchedWindow(rawWindow) {
|
|
|
1142
1121
|
|
|
1143
1122
|
if (typeof getter === 'function') {
|
|
1144
1123
|
safeDesc.get = function get() {
|
|
1145
|
-
return overwrittenValue === DEFAULT_OVERWRITTEN_VALUE ? ReflectApply$3(getter, rawWindow, emptyArray
|
|
1124
|
+
return overwrittenValue === DEFAULT_OVERWRITTEN_VALUE ? ReflectApply$3(getter, rawWindow, emptyArray) : overwrittenValue;
|
|
1146
1125
|
};
|
|
1147
1126
|
}
|
|
1148
1127
|
|
|
@@ -1172,7 +1151,7 @@ function createPatchedWindow(rawWindow) {
|
|
|
1172
1151
|
if (typeof getter === 'function') {
|
|
1173
1152
|
safeDesc.get = function get() {
|
|
1174
1153
|
if (overwrittenValue === DEFAULT_OVERWRITTEN_VALUE) {
|
|
1175
|
-
return getPatchedWindow(ReflectApply$3(getter, rawWindow, emptyArray
|
|
1154
|
+
return getPatchedWindow(ReflectApply$3(getter, rawWindow, emptyArray));
|
|
1176
1155
|
}
|
|
1177
1156
|
|
|
1178
1157
|
return overwrittenValue;
|
|
@@ -1194,24 +1173,40 @@ function createPatchedWindow(rawWindow) {
|
|
|
1194
1173
|
if (unsafePostMessageDesc) {
|
|
1195
1174
|
const safeDesc = toSafeDescriptor(unsafePostMessageDesc);
|
|
1196
1175
|
const {
|
|
1197
|
-
value:
|
|
1176
|
+
value: originalPostMessage
|
|
1198
1177
|
} = safeDesc;
|
|
1199
1178
|
|
|
1200
|
-
if (typeof
|
|
1201
|
-
safeDesc.value =
|
|
1202
|
-
return ReflectApply$3(patchedWindowPostMessageValue, rawWindow, args);
|
|
1203
|
-
};
|
|
1179
|
+
if (typeof originalPostMessage === 'function') {
|
|
1180
|
+
safeDesc.value = getPatchedPostMessage(originalPostMessage, rawWindow);
|
|
1204
1181
|
}
|
|
1205
1182
|
|
|
1206
1183
|
ReflectDefineProperty(patchedWindow, 'postMessage', safeDesc);
|
|
1207
1184
|
}
|
|
1208
1185
|
|
|
1209
1186
|
return patchedWindow;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
function getPatchedPostMessage(originalValue, rawWindow) {
|
|
1190
|
+
return function postMessage(...args) {
|
|
1191
|
+
const message = args.length ? args[0] : undefined;
|
|
1192
|
+
|
|
1193
|
+
if (isObject(message)) {
|
|
1194
|
+
try {
|
|
1195
|
+
args[0] = JSONClone(message);
|
|
1196
|
+
} catch (_unused) {
|
|
1197
|
+
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
|
1198
|
+
throw new DOMException('The object could not be cloned.');
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
return ReflectApply$3(originalValue, rawWindow, args);
|
|
1203
|
+
};
|
|
1210
1204
|
} // setInterval and clearInterval are part of WindowOrGlobalScope mixin, they are
|
|
1211
1205
|
// not on Window.prototype. See https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope.
|
|
1212
1206
|
|
|
1213
1207
|
|
|
1214
1208
|
const {
|
|
1209
|
+
clearInterval: WindowStaticClearInterval,
|
|
1215
1210
|
decodeURIComponent: WindowStaticDecodeURIComponent,
|
|
1216
1211
|
encodeURIComponent: WindowStaticEncodeURIComponent,
|
|
1217
1212
|
fetch: WindowStaticFetch,
|
|
@@ -1264,19 +1259,19 @@ function WindowClearInterval(win, intervalID) {
|
|
|
1264
1259
|
}
|
|
1265
1260
|
|
|
1266
1261
|
function WindowLengthGetter(win) {
|
|
1267
|
-
return ReflectApply$3(WindowStaticLengthGetter, win, emptyArray
|
|
1262
|
+
return ReflectApply$3(WindowStaticLengthGetter, win, emptyArray);
|
|
1268
1263
|
}
|
|
1269
1264
|
|
|
1270
1265
|
function WindowOpenerGetter(win) {
|
|
1271
|
-
return ReflectApply$3(WindowStaticOpenerGetter, win, emptyArray
|
|
1266
|
+
return ReflectApply$3(WindowStaticOpenerGetter, win, emptyArray);
|
|
1272
1267
|
}
|
|
1273
1268
|
|
|
1274
1269
|
function WindowParentGetter(win) {
|
|
1275
|
-
return ReflectApply$3(WindowStaticParentGetter, win, emptyArray
|
|
1270
|
+
return ReflectApply$3(WindowStaticParentGetter, win, emptyArray);
|
|
1276
1271
|
}
|
|
1277
1272
|
|
|
1278
1273
|
function WindowSelfGetter(win) {
|
|
1279
|
-
return ReflectApply$3(WindowStaticSelfGetter, win, emptyArray
|
|
1274
|
+
return ReflectApply$3(WindowStaticSelfGetter, win, emptyArray);
|
|
1280
1275
|
}
|
|
1281
1276
|
|
|
1282
1277
|
function WindowSetInterval(win, ...args) {
|
|
@@ -1291,8 +1286,8 @@ const XhrProto = XhrCtor.prototype;
|
|
|
1291
1286
|
const {
|
|
1292
1287
|
send: XhrProtoSend
|
|
1293
1288
|
} = XhrProto;
|
|
1294
|
-
const XhrProtoResponseTextGetter = ObjectLookupOwnGetter
|
|
1295
|
-
const XhrProtoStatusGetter = ObjectLookupOwnGetter
|
|
1289
|
+
const XhrProtoResponseTextGetter = ObjectLookupOwnGetter(XhrProto, 'responseText');
|
|
1290
|
+
const XhrProtoStatusGetter = ObjectLookupOwnGetter(XhrProto, 'status');
|
|
1296
1291
|
const XhrProtoWithCredentialsSetter = ObjectLookupOwnSetter(XhrProto, 'withCredentials'); // istanbul ignore next
|
|
1297
1292
|
|
|
1298
1293
|
const {
|
|
@@ -1305,24 +1300,24 @@ function XhrOpen(xhr, requestMethod, url, async = true) {
|
|
|
1305
1300
|
|
|
1306
1301
|
|
|
1307
1302
|
function XhrResponseTextGetter(xhr) {
|
|
1308
|
-
return ReflectApply$3(XhrProtoResponseTextGetter, xhr, emptyArray
|
|
1303
|
+
return ReflectApply$3(XhrProtoResponseTextGetter, xhr, emptyArray);
|
|
1309
1304
|
} // istanbul ignore next
|
|
1310
1305
|
|
|
1311
1306
|
|
|
1312
1307
|
function XhrSend(xhr) {
|
|
1313
|
-
return ReflectApply$3(XhrProtoSend, xhr, emptyArray
|
|
1308
|
+
return ReflectApply$3(XhrProtoSend, xhr, emptyArray);
|
|
1314
1309
|
} // istanbul ignore next
|
|
1315
1310
|
|
|
1316
1311
|
|
|
1317
1312
|
function XhrStatusGetter(xhr) {
|
|
1318
|
-
return ReflectApply$3(XhrProtoStatusGetter, xhr, emptyArray
|
|
1313
|
+
return ReflectApply$3(XhrProtoStatusGetter, xhr, emptyArray);
|
|
1319
1314
|
} // istanbul ignore next
|
|
1320
1315
|
|
|
1321
1316
|
|
|
1322
1317
|
function XhrWithCredentialsSetter(xhr, bool) {
|
|
1323
1318
|
ReflectApply$3(XhrProtoWithCredentialsSetter, xhr, [bool]);
|
|
1324
1319
|
}
|
|
1325
|
-
/*! version: 0.14.
|
|
1320
|
+
/*! version: 0.14.28 */
|
|
1326
1321
|
|
|
1327
1322
|
/*!
|
|
1328
1323
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -1360,7 +1355,7 @@ function sanitizeURLForElement(url) {
|
|
|
1360
1355
|
function sanitizeURLString(urlString) {
|
|
1361
1356
|
return urlString === '' ? urlString : StringReplace(urlString, REMOVE_URL_CHARS_REGEXP, '');
|
|
1362
1357
|
}
|
|
1363
|
-
/*! version: 0.14.
|
|
1358
|
+
/*! version: 0.14.28 */
|
|
1364
1359
|
|
|
1365
1360
|
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
|
|
1366
1361
|
|
|
@@ -2967,7 +2962,7 @@ function allowCustomTagHook(node, data, _config) {
|
|
|
2967
2962
|
allowedTags[tagName] = true;
|
|
2968
2963
|
}
|
|
2969
2964
|
}
|
|
2970
|
-
/*! version: 0.14.
|
|
2965
|
+
/*! version: 0.14.28 */
|
|
2971
2966
|
|
|
2972
2967
|
/*!
|
|
2973
2968
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -3112,7 +3107,7 @@ function abstractFactoryValueThrower(proto, propName) {
|
|
|
3112
3107
|
|
|
3113
3108
|
function abstractFactoryGetThrower(proto, propName) {
|
|
3114
3109
|
return function getThrowerDistortionFactory(_globalObject) {
|
|
3115
|
-
const originalGet = ObjectLookupOwnGetter
|
|
3110
|
+
const originalGet = ObjectLookupOwnGetter(proto, propName);
|
|
3116
3111
|
|
|
3117
3112
|
function get() {
|
|
3118
3113
|
throw new LockerSecurityError(`Cannot access ${propName}.`);
|
|
@@ -3539,11 +3534,57 @@ function distortionCookieStoreGetAll(globalObject, options) {
|
|
|
3539
3534
|
};
|
|
3540
3535
|
|
|
3541
3536
|
return [originalGetAll, getAll];
|
|
3537
|
+
} // @ts-ignore: TS doesn't like null as a EventTargetRestrictionRegistry.
|
|
3538
|
+
|
|
3539
|
+
|
|
3540
|
+
const restrictionsBySandboxKey = {
|
|
3541
|
+
__proto__: null
|
|
3542
|
+
};
|
|
3543
|
+
|
|
3544
|
+
function isEventTargetRestricted(eventTarget, eventName, options) {
|
|
3545
|
+
const {
|
|
3546
|
+
key
|
|
3547
|
+
} = options;
|
|
3548
|
+
const bySandboxKey = restrictionsBySandboxKey[key];
|
|
3549
|
+
|
|
3550
|
+
if (!bySandboxKey || !bySandboxKey[eventName]) {
|
|
3551
|
+
return false;
|
|
3552
|
+
}
|
|
3553
|
+
|
|
3554
|
+
const {
|
|
3555
|
+
constructor
|
|
3556
|
+
} = eventTarget; // @ts-ignore: TS says Argument of type 'RestrictionEntryByEventName' is not assignable to parameter of type 'Set<any>'.
|
|
3557
|
+
// ...But it is.
|
|
3558
|
+
|
|
3559
|
+
return SetHas(bySandboxKey[eventName], constructor);
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
function registerEventTargetRestriction(EventTargetCtor, eventName, options) {
|
|
3563
|
+
const {
|
|
3564
|
+
prototype: EventTargetProto
|
|
3565
|
+
} = EventTargetCtor;
|
|
3566
|
+
|
|
3567
|
+
if (!isEventTargetRestricted(EventTargetProto, eventName, options)) {
|
|
3568
|
+
var _restrictionsBySandbo;
|
|
3569
|
+
|
|
3570
|
+
const {
|
|
3571
|
+
key
|
|
3572
|
+
} = options;
|
|
3573
|
+
const bySandboxKey = (_restrictionsBySandbo = restrictionsBySandboxKey[key]) !== null && _restrictionsBySandbo !== void 0 ? _restrictionsBySandbo : {
|
|
3574
|
+
__proto__: null
|
|
3575
|
+
};
|
|
3576
|
+
const byEventName = bySandboxKey[eventName] || new SetCtor(); // @ts-ignore: Argument of type 'RestrictionEntryByEventName' is not assignable to parameter of type 'Set<any>'
|
|
3577
|
+
// ...But it is.
|
|
3578
|
+
|
|
3579
|
+
SetAdd(byEventName, EventTargetCtor);
|
|
3580
|
+
bySandboxKey[eventName] = byEventName;
|
|
3581
|
+
restrictionsBySandboxKey[key] = bySandboxKey;
|
|
3582
|
+
}
|
|
3542
3583
|
}
|
|
3543
3584
|
/* istanbul ignore next: only available in secure context */
|
|
3544
3585
|
|
|
3545
3586
|
|
|
3546
|
-
function distortionCookieStoreOnChange(globalObject,
|
|
3587
|
+
function distortionCookieStoreOnChange(globalObject, options) {
|
|
3547
3588
|
const {
|
|
3548
3589
|
CookieStore
|
|
3549
3590
|
} = globalObject;
|
|
@@ -3562,6 +3603,7 @@ function distortionCookieStoreOnChange(globalObject, _options) {
|
|
|
3562
3603
|
throw new LockerSecurityError('Cannot set cookieStore.onchange.');
|
|
3563
3604
|
}
|
|
3564
3605
|
|
|
3606
|
+
registerEventTargetRestriction(CookieStore, 'change', options);
|
|
3565
3607
|
return [originalOnChangeSetter, onchange];
|
|
3566
3608
|
}
|
|
3567
3609
|
/* istanbul ignore next: only available in secure context */
|
|
@@ -3647,7 +3689,7 @@ function distortionDocumentCookieGetter(globalObject, options) {
|
|
|
3647
3689
|
const {
|
|
3648
3690
|
key
|
|
3649
3691
|
} = options;
|
|
3650
|
-
const originalCookieGetter = ObjectLookupOwnGetter
|
|
3692
|
+
const originalCookieGetter = ObjectLookupOwnGetter(Document.prototype, 'cookie');
|
|
3651
3693
|
|
|
3652
3694
|
function get() {
|
|
3653
3695
|
const documentCookieValue = DocumentCookieGetter(this);
|
|
@@ -3974,7 +4016,7 @@ function distortionElementAttributesGetter(globalObject) {
|
|
|
3974
4016
|
const {
|
|
3975
4017
|
Element
|
|
3976
4018
|
} = globalObject;
|
|
3977
|
-
const originalAttributesGetter = ObjectLookupOwnGetter
|
|
4019
|
+
const originalAttributesGetter = ObjectLookupOwnGetter(Element.prototype, 'attributes');
|
|
3978
4020
|
|
|
3979
4021
|
function attributes() {
|
|
3980
4022
|
const attrs = ElementAttributesGetter(this);
|
|
@@ -4170,7 +4212,7 @@ function distortionElementRemove(globalObject) {
|
|
|
4170
4212
|
throw new LockerSecurityError(`Cannot remove ${this.nodeName}.`);
|
|
4171
4213
|
}
|
|
4172
4214
|
|
|
4173
|
-
ReflectApply$3(originalRemove, this, emptyArray
|
|
4215
|
+
ReflectApply$3(originalRemove, this, emptyArray);
|
|
4174
4216
|
}
|
|
4175
4217
|
|
|
4176
4218
|
return [originalRemove, remove];
|
|
@@ -4449,7 +4491,7 @@ function distortionElementShadowRootGetter(globalObject) {
|
|
|
4449
4491
|
const {
|
|
4450
4492
|
Element
|
|
4451
4493
|
} = globalObject;
|
|
4452
|
-
const originalShadowRootGetter = ObjectLookupOwnGetter
|
|
4494
|
+
const originalShadowRootGetter = ObjectLookupOwnGetter(Element.prototype, 'shadowRoot');
|
|
4453
4495
|
|
|
4454
4496
|
function shadowRoot() {
|
|
4455
4497
|
return null;
|
|
@@ -4460,7 +4502,7 @@ function distortionElementShadowRootGetter(globalObject) {
|
|
|
4460
4502
|
|
|
4461
4503
|
function createDistortedComposedPath(event) {
|
|
4462
4504
|
const currentTarget = EventCurrentTargetGetter(event);
|
|
4463
|
-
const rawComposedPath = ReflectApply$3(EventProtoComposedPath, event, emptyArray
|
|
4505
|
+
const rawComposedPath = ReflectApply$3(EventProtoComposedPath, event, emptyArray);
|
|
4464
4506
|
const indexOfcurrentTarget = ArrayIndexOf(rawComposedPath, currentTarget);
|
|
4465
4507
|
let distortedComposedPath = rawComposedPath;
|
|
4466
4508
|
|
|
@@ -4498,7 +4540,7 @@ function distortionEventPathGetter(globalObject) {
|
|
|
4498
4540
|
const {
|
|
4499
4541
|
Event
|
|
4500
4542
|
} = globalObject;
|
|
4501
|
-
const originalPathGetter = ObjectLookupOwnGetter
|
|
4543
|
+
const originalPathGetter = ObjectLookupOwnGetter(Event.prototype, 'path');
|
|
4502
4544
|
|
|
4503
4545
|
if (!originalPathGetter) {
|
|
4504
4546
|
return null;
|
|
@@ -4511,21 +4553,44 @@ function distortionEventPathGetter(globalObject) {
|
|
|
4511
4553
|
return [originalPathGetter, path];
|
|
4512
4554
|
}
|
|
4513
4555
|
|
|
4514
|
-
function distortionEventTargetAddEventListener(globalObject) {
|
|
4556
|
+
function distortionEventTargetAddEventListener(globalObject, options) {
|
|
4515
4557
|
const {
|
|
4516
|
-
EventTarget
|
|
4517
|
-
CookieStore
|
|
4558
|
+
EventTarget
|
|
4518
4559
|
} = globalObject;
|
|
4560
|
+
const {
|
|
4561
|
+
addEventListener: originalAddEventListener
|
|
4562
|
+
} = EventTarget.prototype;
|
|
4519
4563
|
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4564
|
+
function addEventListener(...args) {
|
|
4565
|
+
const {
|
|
4566
|
+
length
|
|
4567
|
+
} = args; // Ensure that we always fall back to the default platform behavior
|
|
4568
|
+
// Which should fail if less than 2 arguments are provided.
|
|
4523
4569
|
|
|
4524
|
-
|
|
4570
|
+
if (length > 1) {
|
|
4571
|
+
const {
|
|
4572
|
+
0: eventName
|
|
4573
|
+
} = args;
|
|
4525
4574
|
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4575
|
+
if (isEventTargetRestricted(this, eventName, options)) {
|
|
4576
|
+
var _safeDesc$value, _safeDesc;
|
|
4577
|
+
|
|
4578
|
+
const unsafeDesc = ReflectGetOwnPropertyDescriptor$1(this.constructor, 'name');
|
|
4579
|
+
let safeDesc;
|
|
4580
|
+
|
|
4581
|
+
if (unsafeDesc) {
|
|
4582
|
+
safeDesc = toSafeDescriptor(unsafeDesc);
|
|
4583
|
+
}
|
|
4584
|
+
|
|
4585
|
+
const name = toString$1((_safeDesc$value = (_safeDesc = safeDesc) === null || _safeDesc === void 0 ? void 0 : _safeDesc.value) !== null && _safeDesc$value !== void 0 ? _safeDesc$value : '');
|
|
4586
|
+
let exceptionMessage = `Cannot add '${eventName}' event listener`;
|
|
4587
|
+
|
|
4588
|
+
if (name) {
|
|
4589
|
+
exceptionMessage += ` to ${name} object`;
|
|
4590
|
+
}
|
|
4591
|
+
|
|
4592
|
+
throw new LockerSecurityError(`${exceptionMessage}.`);
|
|
4593
|
+
}
|
|
4529
4594
|
}
|
|
4530
4595
|
|
|
4531
4596
|
return ReflectApply$3(originalAddEventListener, this, args);
|
|
@@ -4538,7 +4603,7 @@ function distortionHTMLElementDatasetGetter(globalObject) {
|
|
|
4538
4603
|
const {
|
|
4539
4604
|
HTMLElement
|
|
4540
4605
|
} = globalObject;
|
|
4541
|
-
const originalDatasetGetter = ObjectLookupOwnGetter
|
|
4606
|
+
const originalDatasetGetter = ObjectLookupOwnGetter(HTMLElement.prototype, 'dataset');
|
|
4542
4607
|
|
|
4543
4608
|
function dataset() {
|
|
4544
4609
|
return liveObjectFromGetter(originalDatasetGetter, this);
|
|
@@ -4602,7 +4667,7 @@ function distortionHTMLElementStyleGetter(globalObject) {
|
|
|
4602
4667
|
const {
|
|
4603
4668
|
HTMLElement
|
|
4604
4669
|
} = globalObject;
|
|
4605
|
-
const originalStyleGetter = ObjectLookupOwnGetter
|
|
4670
|
+
const originalStyleGetter = ObjectLookupOwnGetter(HTMLElement.prototype, 'style');
|
|
4606
4671
|
|
|
4607
4672
|
function style() {
|
|
4608
4673
|
const styleObject = HTMLElementStyleGetter$1(this);
|
|
@@ -4626,7 +4691,7 @@ function distortionHTMLFrameElementContentDocumentGetter(globalObject) {
|
|
|
4626
4691
|
const {
|
|
4627
4692
|
HTMLFrameElement
|
|
4628
4693
|
} = globalObject;
|
|
4629
|
-
const originalContentDocumentGetter = ObjectLookupOwnGetter
|
|
4694
|
+
const originalContentDocumentGetter = ObjectLookupOwnGetter(HTMLFrameElement.prototype, 'contentDocument');
|
|
4630
4695
|
|
|
4631
4696
|
function contentDocument() {
|
|
4632
4697
|
// Intentionally ignoring the returned value from the original to
|
|
@@ -4642,7 +4707,7 @@ function distortionHTMLFrameElemenentContentWindowGetter(globalObject) {
|
|
|
4642
4707
|
const {
|
|
4643
4708
|
HTMLFrameElement
|
|
4644
4709
|
} = globalObject;
|
|
4645
|
-
const originalContentWindowGetter = ObjectLookupOwnGetter
|
|
4710
|
+
const originalContentWindowGetter = ObjectLookupOwnGetter(HTMLFrameElement.prototype, 'contentWindow');
|
|
4646
4711
|
|
|
4647
4712
|
function contentWindow() {
|
|
4648
4713
|
const rawContentWindow = HTMLFrameElementContentWindowGetter(this);
|
|
@@ -4656,7 +4721,7 @@ function distortionHTMLIFrameElementContentDocumentGetter(globalObject) {
|
|
|
4656
4721
|
const {
|
|
4657
4722
|
HTMLIFrameElement
|
|
4658
4723
|
} = globalObject;
|
|
4659
|
-
const originalContentDocumentGetter = ObjectLookupOwnGetter
|
|
4724
|
+
const originalContentDocumentGetter = ObjectLookupOwnGetter(HTMLIFrameElement.prototype, 'contentDocument');
|
|
4660
4725
|
|
|
4661
4726
|
function contentDocument() {
|
|
4662
4727
|
// Intentionally ignoring the returned value from the original to
|
|
@@ -4672,7 +4737,7 @@ function distortionHTMLIFrameElementContentWindowGetter(globalObject) {
|
|
|
4672
4737
|
const {
|
|
4673
4738
|
HTMLIFrameElement
|
|
4674
4739
|
} = globalObject;
|
|
4675
|
-
const originalContentWindowGetter = ObjectLookupOwnGetter
|
|
4740
|
+
const originalContentWindowGetter = ObjectLookupOwnGetter(HTMLIFrameElement.prototype, 'contentWindow');
|
|
4676
4741
|
|
|
4677
4742
|
function contentWindow() {
|
|
4678
4743
|
const rawContentWindow = HTMLIFrameElementContentWindowGetter$1(this);
|
|
@@ -4767,7 +4832,7 @@ function distortionHTMLObjectElementContentDocumentGetter(globalObject) {
|
|
|
4767
4832
|
const {
|
|
4768
4833
|
HTMLObjectElement
|
|
4769
4834
|
} = globalObject;
|
|
4770
|
-
const originalContentDocumentGetter = ObjectLookupOwnGetter
|
|
4835
|
+
const originalContentDocumentGetter = ObjectLookupOwnGetter(HTMLObjectElement.prototype, 'contentDocument');
|
|
4771
4836
|
|
|
4772
4837
|
function contentDocument() {
|
|
4773
4838
|
// Intentionally ignoring the returned value from the original to
|
|
@@ -4783,7 +4848,7 @@ function distortionHTMLObjectElementContentWindowGetter(globalObject) {
|
|
|
4783
4848
|
const {
|
|
4784
4849
|
HTMLObjectElement
|
|
4785
4850
|
} = globalObject;
|
|
4786
|
-
const originalContentWindowGetter = ObjectLookupOwnGetter
|
|
4851
|
+
const originalContentWindowGetter = ObjectLookupOwnGetter(HTMLObjectElement.prototype, 'contentWindow'); // contentWindow is not supported on object elements in iOS < 13.
|
|
4787
4852
|
// https://caniuse.com/mdn-api_htmlobjectelement_contentwindow
|
|
4788
4853
|
|
|
4789
4854
|
if (!originalContentWindowGetter) {
|
|
@@ -4808,10 +4873,10 @@ function distortionHTMLScriptElementSrcGetter(globalObject) {
|
|
|
4808
4873
|
const {
|
|
4809
4874
|
HTMLScriptElement
|
|
4810
4875
|
} = globalObject;
|
|
4811
|
-
const originalSrcGetter = ObjectLookupOwnGetter
|
|
4876
|
+
const originalSrcGetter = ObjectLookupOwnGetter(HTMLScriptElement.prototype, 'src');
|
|
4812
4877
|
|
|
4813
4878
|
function src() {
|
|
4814
|
-
return getDatasetSrcValue(this) || ReflectApply$3(HTMLScriptElementProtoSrcGetter, this, emptyArray
|
|
4879
|
+
return getDatasetSrcValue(this) || ReflectApply$3(HTMLScriptElementProtoSrcGetter, this, emptyArray);
|
|
4815
4880
|
}
|
|
4816
4881
|
|
|
4817
4882
|
return [originalSrcGetter, src];
|
|
@@ -4835,7 +4900,7 @@ function distortionMessageEventSourceGetter(globalObject) {
|
|
|
4835
4900
|
const {
|
|
4836
4901
|
MessageEvent
|
|
4837
4902
|
} = globalObject;
|
|
4838
|
-
const originalSourceGetter = ObjectLookupOwnGetter
|
|
4903
|
+
const originalSourceGetter = ObjectLookupOwnGetter(MessageEvent.prototype, 'source');
|
|
4839
4904
|
|
|
4840
4905
|
function source() {
|
|
4841
4906
|
const rawSource = MessageEventSourceGetter(this);
|
|
@@ -4879,7 +4944,7 @@ function distortionNavigatorServiceWorkerGetter(globalObject) {
|
|
|
4879
4944
|
const {
|
|
4880
4945
|
Navigator
|
|
4881
4946
|
} = globalObject;
|
|
4882
|
-
const originalServiceWorkerGetter = ObjectLookupOwnGetter
|
|
4947
|
+
const originalServiceWorkerGetter = ObjectLookupOwnGetter(Navigator.prototype, 'serviceWorker');
|
|
4883
4948
|
|
|
4884
4949
|
if (!originalServiceWorkerGetter) {
|
|
4885
4950
|
return null;
|
|
@@ -4968,7 +5033,7 @@ function distortionShadowRootModeGetter(globalObject) {
|
|
|
4968
5033
|
const {
|
|
4969
5034
|
ShadowRoot
|
|
4970
5035
|
} = globalObject;
|
|
4971
|
-
const originalModeGetter = ObjectLookupOwnGetter
|
|
5036
|
+
const originalModeGetter = ObjectLookupOwnGetter(ShadowRoot.prototype, 'mode');
|
|
4972
5037
|
|
|
4973
5038
|
function mode() {
|
|
4974
5039
|
return 'closed';
|
|
@@ -5304,7 +5369,7 @@ const {
|
|
|
5304
5369
|
removeItem: patchedStorageProtoRemoveItem,
|
|
5305
5370
|
setItem: patchedStorageProtoSetItem
|
|
5306
5371
|
} = PatchedStorage.prototype;
|
|
5307
|
-
const patchedStorageProtoLengthGetter = ObjectLookupOwnGetter
|
|
5372
|
+
const patchedStorageProtoLengthGetter = ObjectLookupOwnGetter(PatchedStorage.prototype, 'length');
|
|
5308
5373
|
|
|
5309
5374
|
function createDistortionStorageFactory(storageName) {
|
|
5310
5375
|
return function distortionStorageFactory(globalObject, options) {
|
|
@@ -5329,7 +5394,7 @@ function distortionStorageLength(globalObject) {
|
|
|
5329
5394
|
const {
|
|
5330
5395
|
Storage
|
|
5331
5396
|
} = globalObject;
|
|
5332
|
-
const originalLengthGetter = ObjectLookupOwnGetter
|
|
5397
|
+
const originalLengthGetter = ObjectLookupOwnGetter(Storage.prototype, 'length');
|
|
5333
5398
|
return [originalLengthGetter, patchedStorageProtoLengthGetter];
|
|
5334
5399
|
}
|
|
5335
5400
|
|
|
@@ -5397,7 +5462,7 @@ function distortionSVGElementDatasetGetter(globalObject) {
|
|
|
5397
5462
|
const {
|
|
5398
5463
|
SVGElement
|
|
5399
5464
|
} = globalObject;
|
|
5400
|
-
const originalDatasetGetter = ObjectLookupOwnGetter
|
|
5465
|
+
const originalDatasetGetter = ObjectLookupOwnGetter(SVGElement.prototype, 'dataset');
|
|
5401
5466
|
|
|
5402
5467
|
function dataset() {
|
|
5403
5468
|
return liveObjectFromGetter(originalDatasetGetter, this);
|
|
@@ -5572,7 +5637,7 @@ function distortionWindowFetch(globalObject, options) {
|
|
|
5572
5637
|
|
|
5573
5638
|
|
|
5574
5639
|
function distortionWindowFramesGetter(globalObject) {
|
|
5575
|
-
const originalWindowFramesGetter = ObjectLookupOwnGetter
|
|
5640
|
+
const originalWindowFramesGetter = ObjectLookupOwnGetter(globalObject, 'frames');
|
|
5576
5641
|
|
|
5577
5642
|
if (originalWindowFramesGetter === undefined) {
|
|
5578
5643
|
return null;
|
|
@@ -5809,7 +5874,7 @@ function distortionWindowFramesGetter(globalObject) {
|
|
|
5809
5874
|
}
|
|
5810
5875
|
|
|
5811
5876
|
function distortionWindowLengthGetter(globalObject) {
|
|
5812
|
-
const originalLengthGetter = ObjectLookupOwnGetter
|
|
5877
|
+
const originalLengthGetter = ObjectLookupOwnGetter(globalObject, 'length');
|
|
5813
5878
|
|
|
5814
5879
|
if (originalLengthGetter === undefined) {
|
|
5815
5880
|
return null;
|
|
@@ -5822,6 +5887,24 @@ function distortionWindowLengthGetter(globalObject) {
|
|
|
5822
5887
|
return [originalLengthGetter, length];
|
|
5823
5888
|
}
|
|
5824
5889
|
|
|
5890
|
+
function distortionWindowOnstorage(globalObject, options) {
|
|
5891
|
+
const {
|
|
5892
|
+
Window
|
|
5893
|
+
} = globalObject;
|
|
5894
|
+
const originalOnstorageSetter = ObjectLookupOwnSetter(globalObject, 'onstorage');
|
|
5895
|
+
|
|
5896
|
+
if (typeof originalOnstorageSetter !== 'function') {
|
|
5897
|
+
return null;
|
|
5898
|
+
}
|
|
5899
|
+
|
|
5900
|
+
const onstorage = function onstorage() {
|
|
5901
|
+
throw new LockerSecurityError('Cannot set window.onstorage.');
|
|
5902
|
+
};
|
|
5903
|
+
|
|
5904
|
+
registerEventTargetRestriction(Window, 'storage', options);
|
|
5905
|
+
return [originalOnstorageSetter, onstorage];
|
|
5906
|
+
}
|
|
5907
|
+
|
|
5825
5908
|
function distortionWindowOpen(globalObject) {
|
|
5826
5909
|
const {
|
|
5827
5910
|
open: originalOpenValue
|
|
@@ -5837,7 +5920,7 @@ function distortionWindowOpen(globalObject) {
|
|
|
5837
5920
|
}
|
|
5838
5921
|
|
|
5839
5922
|
function distortionWindowOpenerGetter(globalObject) {
|
|
5840
|
-
const originalOpenerGetter = ObjectLookupOwnGetter
|
|
5923
|
+
const originalOpenerGetter = ObjectLookupOwnGetter(globalObject, 'opener');
|
|
5841
5924
|
|
|
5842
5925
|
if (originalOpenerGetter === undefined) {
|
|
5843
5926
|
return null;
|
|
@@ -5852,7 +5935,7 @@ function distortionWindowOpenerGetter(globalObject) {
|
|
|
5852
5935
|
}
|
|
5853
5936
|
|
|
5854
5937
|
function distortionWindowParentGetter(globalObject) {
|
|
5855
|
-
const originalParentGetter = ObjectLookupOwnGetter
|
|
5938
|
+
const originalParentGetter = ObjectLookupOwnGetter(globalObject, 'parent');
|
|
5856
5939
|
|
|
5857
5940
|
if (originalParentGetter === undefined) {
|
|
5858
5941
|
return null;
|
|
@@ -5867,13 +5950,11 @@ function distortionWindowParentGetter(globalObject) {
|
|
|
5867
5950
|
}
|
|
5868
5951
|
|
|
5869
5952
|
function distortionWindowPostMessage(globalObject) {
|
|
5870
|
-
const
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
return [originalPostMessageValue, postMessage];
|
|
5953
|
+
const {
|
|
5954
|
+
postMessage: originalPostMessage
|
|
5955
|
+
} = globalObject;
|
|
5956
|
+
const postMessage = getPatchedPostMessage(originalPostMessage, globalObject);
|
|
5957
|
+
return [originalPostMessage, postMessage];
|
|
5877
5958
|
}
|
|
5878
5959
|
|
|
5879
5960
|
function distortionWindowSetInterval(globalObject, options) {
|
|
@@ -5998,10 +6079,10 @@ function distortionXMLHttpRequestResponseGetter(globalObject) {
|
|
|
5998
6079
|
Document,
|
|
5999
6080
|
XMLHttpRequest
|
|
6000
6081
|
} = globalObject;
|
|
6001
|
-
const originalResponseGetter = ObjectLookupOwnGetter
|
|
6082
|
+
const originalResponseGetter = ObjectLookupOwnGetter(XMLHttpRequest.prototype, 'response');
|
|
6002
6083
|
|
|
6003
6084
|
function response() {
|
|
6004
|
-
const responseValue = ReflectApply$3(originalResponseGetter, this, emptyArray
|
|
6085
|
+
const responseValue = ReflectApply$3(originalResponseGetter, this, emptyArray);
|
|
6005
6086
|
return response instanceof Document ? sanitizeDocument(responseValue) : responseValue;
|
|
6006
6087
|
}
|
|
6007
6088
|
|
|
@@ -6012,10 +6093,10 @@ function distortionXMLHttpRequestResponseXMLGetter(globalObject) {
|
|
|
6012
6093
|
const {
|
|
6013
6094
|
XMLHttpRequest
|
|
6014
6095
|
} = globalObject;
|
|
6015
|
-
const originalResponseXMLGetter = ObjectLookupOwnGetter
|
|
6096
|
+
const originalResponseXMLGetter = ObjectLookupOwnGetter(XMLHttpRequest.prototype, 'responseXML');
|
|
6016
6097
|
|
|
6017
6098
|
function responseXML() {
|
|
6018
|
-
const responseValue = ReflectApply$3(originalResponseXMLGetter, this, emptyArray
|
|
6099
|
+
const responseValue = ReflectApply$3(originalResponseXMLGetter, this, emptyArray);
|
|
6019
6100
|
return sanitizeDocument(responseValue);
|
|
6020
6101
|
}
|
|
6021
6102
|
|
|
@@ -6055,7 +6136,7 @@ distortionStorageLength, distortionStorageGetItem, distortionStorageSetItem, dis
|
|
|
6055
6136
|
distortionSVGElementDatasetGetter, // SVGUseElement
|
|
6056
6137
|
distortionSVGUseElementHrefAttribute, distortionSVGUseElementXlinkHrefAttribute, // URL
|
|
6057
6138
|
distortionURLCreateObjectURL, // Window
|
|
6058
|
-
distortionWindowFetch, distortionWindowFramesGetter, distortionWindowLengthGetter, distortionWindowOpen, distortionWindowOpenerGetter, distortionWindowParentGetter, distortionWindowPostMessage, // Worker
|
|
6139
|
+
distortionWindowFetch, distortionWindowFramesGetter, distortionWindowLengthGetter, distortionWindowOnstorage, distortionWindowOpen, distortionWindowOpenerGetter, distortionWindowParentGetter, distortionWindowPostMessage, // Worker
|
|
6059
6140
|
distortionWorkerCtor, distortionWorkerProto, // XHR
|
|
6060
6141
|
distortionXMLHttpRequestOpen, distortionXMLHttpRequestResponseGetter, distortionXMLHttpRequestResponseXMLGetter];
|
|
6061
6142
|
const fundamentalKeyedDistortionFactories = [// Aura
|
|
@@ -6189,7 +6270,7 @@ function createExternalDistortionEntries(globalObject, key, evaluator, config) {
|
|
|
6189
6270
|
ReflectApply$3(ArrayProtoPush, entries, makeElementDistortionsForSandboxKey(key));
|
|
6190
6271
|
return entries;
|
|
6191
6272
|
} // @TODO: [Issue #373] Abstract common code in sandbox and distortion packages
|
|
6192
|
-
/*! version: 0.14.
|
|
6273
|
+
/*! version: 0.14.28 */
|
|
6193
6274
|
|
|
6194
6275
|
/*!
|
|
6195
6276
|
* Copyright (C) 2021 salesforce.com, inc.
|
|
@@ -6350,7 +6431,7 @@ class DefaultInstrumentation {
|
|
|
6350
6431
|
|
|
6351
6432
|
|
|
6352
6433
|
const defaultInstrumentation = new DefaultInstrumentation();
|
|
6353
|
-
/*! version: 0.14.
|
|
6434
|
+
/*! version: 0.14.28 */
|
|
6354
6435
|
|
|
6355
6436
|
/*!
|
|
6356
6437
|
* Copyright (C) 2019 salesforce.com, inc.
|
|
@@ -6390,21 +6471,41 @@ var SupportFlagsEnum;
|
|
|
6390
6471
|
ReflectSetPrototypeOf(SupportFlagsEnum, null); // istanbul ignore next
|
|
6391
6472
|
|
|
6392
6473
|
function createMembraneMarshall() {
|
|
6474
|
+
// This package is bundled by third-parties that have their own build time
|
|
6475
|
+
// replacement logic. Instead of customizing each build system to be aware of
|
|
6476
|
+
// this package we perform a small runtime check to determine whether our
|
|
6477
|
+
// code is minified or in DEBUG_MODE.
|
|
6478
|
+
// https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.debug_mode_enable
|
|
6479
|
+
const DEBUG_MODE = `${() =>
|
|
6480
|
+
/**/
|
|
6481
|
+
1}`.includes('*');
|
|
6482
|
+
const LOCKER_LIVE_MARKER_SYMBOL = Symbol.for('@@lockerLiveValue');
|
|
6483
|
+
const LOCKER_MAGIC_MARKER_SYMBOL = Symbol.for('@@lockerMagicValue');
|
|
6484
|
+
const {
|
|
6485
|
+
toStringTag: TO_STRING_TAG_SYMBOL
|
|
6486
|
+
} = Symbol;
|
|
6487
|
+
const UNDEFINED_SYMBOL = Symbol.for('@@membraneUndefinedValue');
|
|
6393
6488
|
const ArrayCtor = Array;
|
|
6394
6489
|
const {
|
|
6395
6490
|
isArray: isArrayOrNotOrThrowForRevoked
|
|
6396
|
-
} =
|
|
6491
|
+
} = ArrayCtor;
|
|
6492
|
+
const {
|
|
6493
|
+
isView: ArrayBufferIsView
|
|
6494
|
+
} = ArrayBuffer;
|
|
6495
|
+
const ObjectCtor = Object;
|
|
6397
6496
|
const {
|
|
6398
6497
|
defineProperties: ObjectDefineProperties,
|
|
6399
6498
|
freeze: ObjectFreeze,
|
|
6499
|
+
getOwnPropertyDescriptors: ObjectGetOwnPropertyDescriptors,
|
|
6400
6500
|
isFrozen: ObjectIsFrozen,
|
|
6401
6501
|
isSealed: ObjectIsSealed,
|
|
6502
|
+
prototype: ObjectProto,
|
|
6402
6503
|
seal: ObjectSeal
|
|
6403
|
-
} =
|
|
6504
|
+
} = ObjectCtor;
|
|
6404
6505
|
const {
|
|
6405
6506
|
hasOwnProperty: ObjectProtoHasOwnProperty,
|
|
6406
6507
|
toString: ObjectProtoToString
|
|
6407
|
-
} =
|
|
6508
|
+
} = ObjectProto;
|
|
6408
6509
|
const {
|
|
6409
6510
|
revocable: ProxyRevocable
|
|
6410
6511
|
} = Proxy;
|
|
@@ -6432,6 +6533,11 @@ function createMembraneMarshall() {
|
|
|
6432
6533
|
get: WeakMapProtoGet,
|
|
6433
6534
|
set: WeakMapProtoSet
|
|
6434
6535
|
} = WeakMap.prototype;
|
|
6536
|
+
const consoleRef = console;
|
|
6537
|
+
const {
|
|
6538
|
+
warn: consoleWarn
|
|
6539
|
+
} = consoleRef;
|
|
6540
|
+
const localEval = eval;
|
|
6435
6541
|
const globalThisRef = typeof globalThis !== 'undefined' && globalThis || // This is for environments like Android emulators running Chrome 69.
|
|
6436
6542
|
// eslint-disable-next-line no-restricted-globals
|
|
6437
6543
|
typeof self !== 'undefined' && self || ( // See https://mathiasbynens.be/notes/globalthis for more details.
|
|
@@ -6448,16 +6554,7 @@ function createMembraneMarshall() {
|
|
|
6448
6554
|
return this || self;
|
|
6449
6555
|
}
|
|
6450
6556
|
|
|
6451
|
-
}), globalThis);
|
|
6452
|
-
const {
|
|
6453
|
-
eval: cachedLocalEval
|
|
6454
|
-
} = globalThisRef;
|
|
6455
|
-
const LOCKER_LIVE_MARKER_SYMBOL = Symbol.for('@@lockerLiveValue');
|
|
6456
|
-
const LOCKER_MAGIC_MARKER_SYMBOL = Symbol.for('@@lockerMagicValue');
|
|
6457
|
-
const {
|
|
6458
|
-
toStringTag: TO_STRING_TAG_SYMBOL
|
|
6459
|
-
} = Symbol;
|
|
6460
|
-
const UNDEFINED_SYMBOL = Symbol.for('@@membraneUndefinedValue'); // eslint-disable-next-line no-shadow
|
|
6557
|
+
}), globalThis); // eslint-disable-next-line no-shadow
|
|
6461
6558
|
|
|
6462
6559
|
let MarshallSupportFlagsField;
|
|
6463
6560
|
|
|
@@ -6475,7 +6572,7 @@ function createMembraneMarshall() {
|
|
|
6475
6572
|
TargetIntegrityTraits[TargetIntegrityTraits["IsNotExtensible"] = 1] = "IsNotExtensible";
|
|
6476
6573
|
TargetIntegrityTraits[TargetIntegrityTraits["IsSealed"] = 2] = "IsSealed";
|
|
6477
6574
|
TargetIntegrityTraits[TargetIntegrityTraits["IsFrozen"] = 4] = "IsFrozen";
|
|
6478
|
-
TargetIntegrityTraits[TargetIntegrityTraits["Revoked"] =
|
|
6575
|
+
TargetIntegrityTraits[TargetIntegrityTraits["Revoked"] = 8] = "Revoked";
|
|
6479
6576
|
})(TargetIntegrityTraits || (TargetIntegrityTraits = {}));
|
|
6480
6577
|
|
|
6481
6578
|
ReflectSetPrototypeOf(TargetIntegrityTraits, null); // eslint-disable-next-line no-shadow
|
|
@@ -6486,13 +6583,14 @@ function createMembraneMarshall() {
|
|
|
6486
6583
|
TargetTraits[TargetTraits["None"] = 0] = "None";
|
|
6487
6584
|
TargetTraits[TargetTraits["IsArray"] = 1] = "IsArray";
|
|
6488
6585
|
TargetTraits[TargetTraits["IsFunction"] = 2] = "IsFunction";
|
|
6489
|
-
TargetTraits[TargetTraits["
|
|
6490
|
-
TargetTraits[TargetTraits["
|
|
6586
|
+
TargetTraits[TargetTraits["IsArrowFunction"] = 4] = "IsArrowFunction";
|
|
6587
|
+
TargetTraits[TargetTraits["IsObject"] = 8] = "IsObject";
|
|
6491
6588
|
TargetTraits[TargetTraits["Revoked"] = 16] = "Revoked";
|
|
6492
6589
|
})(TargetTraits || (TargetTraits = {}));
|
|
6493
6590
|
|
|
6494
6591
|
ReflectSetPrototypeOf(TargetTraits, null);
|
|
6495
|
-
return function createHooksCallback(color, trapMutations,
|
|
6592
|
+
return function createHooksCallback(color, trapMutations, // eslint-disable-next-line @typescript-eslint/default-param-last
|
|
6593
|
+
supportFlags = SupportFlagsEnum.None, foreignCallableHooksCallback, options) {
|
|
6496
6594
|
const {
|
|
6497
6595
|
distortionCallback = o => o,
|
|
6498
6596
|
instrumentation
|
|
@@ -6515,35 +6613,33 @@ function createMembraneMarshall() {
|
|
|
6515
6613
|
let foreignCallablePreventExtensions;
|
|
6516
6614
|
let foreignCallableSet;
|
|
6517
6615
|
let foreignCallableSetPrototypeOf;
|
|
6616
|
+
let foreignCallableGetOwnPropertyDescriptors;
|
|
6518
6617
|
let foreignCallableGetTargetIntegrityTraits;
|
|
6519
6618
|
let foreignCallableGetUnbrandedTag;
|
|
6520
6619
|
let foreignCallableHasOwnProperty;
|
|
6620
|
+
let foreignCallableIsLiveTarget;
|
|
6621
|
+
let foreignCallableWarn;
|
|
6521
6622
|
let selectedTarget;
|
|
6522
6623
|
|
|
6523
6624
|
function copyForeignDescriptorsIntoShadowTarget(shadowTarget, foreignTargetPointer) {
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6625
|
+
foreignCallableGetOwnPropertyDescriptors(foreignTargetPointer, (...descriptorTuples) => {
|
|
6626
|
+
const descriptors = {};
|
|
6627
|
+
|
|
6628
|
+
for (let i = 0, len = descriptorTuples.length; i < len; i += 7) {
|
|
6629
|
+
const key = descriptorTuples[i];
|
|
6630
|
+
descriptors[key] = createDescriptorFromMeta(descriptorTuples[i + 1], // configurable
|
|
6631
|
+
descriptorTuples[i + 2], // enumerable
|
|
6632
|
+
descriptorTuples[i + 3], // writable
|
|
6633
|
+
descriptorTuples[i + 4], // valuePointer
|
|
6634
|
+
descriptorTuples[i + 5], // getPointer
|
|
6635
|
+
descriptorTuples[i + 6] // setPointer
|
|
6636
|
+
);
|
|
6637
|
+
} // Use `ObjectDefineProperties` instead of individual
|
|
6638
|
+
// `ReflectDefineProperty` calls for better performance.
|
|
6639
|
+
|
|
6640
|
+
|
|
6641
|
+
ObjectDefineProperties(shadowTarget, descriptors);
|
|
6527
6642
|
});
|
|
6528
|
-
const descriptors = {};
|
|
6529
|
-
let safeDesc;
|
|
6530
|
-
|
|
6531
|
-
const callbackWithDescriptor = (configurable, enumerable, writable, valuePointer, getPointer, setPointer) => {
|
|
6532
|
-
safeDesc = createDescriptorFromMeta(configurable, enumerable, writable, valuePointer, getPointer, setPointer);
|
|
6533
|
-
};
|
|
6534
|
-
|
|
6535
|
-
for (let i = 0, len = keys.length; i < len; i += 1) {
|
|
6536
|
-
const key = keys[i];
|
|
6537
|
-
foreignCallableGetOwnPropertyDescriptor(foreignTargetPointer, key, callbackWithDescriptor);
|
|
6538
|
-
|
|
6539
|
-
if (safeDesc) {
|
|
6540
|
-
descriptors[key] = safeDesc;
|
|
6541
|
-
}
|
|
6542
|
-
} // Use `ObjectDefineProperties` instead of individual
|
|
6543
|
-
// `ReflectDefineProperty` calls for better performance.
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
ObjectDefineProperties(shadowTarget, descriptors);
|
|
6547
6643
|
} // metadata is the transferable descriptor definition
|
|
6548
6644
|
|
|
6549
6645
|
|
|
@@ -6587,11 +6683,12 @@ function createMembraneMarshall() {
|
|
|
6587
6683
|
selectedTarget = originalTarget;
|
|
6588
6684
|
};
|
|
6589
6685
|
|
|
6590
|
-
{
|
|
6686
|
+
if (DEBUG_MODE) {
|
|
6591
6687
|
// In case debugging is needed, the following lines can help:
|
|
6592
6688
|
pointer['[[OriginalTarget]]'] = originalTarget;
|
|
6593
6689
|
pointer['[[Color]]'] = color;
|
|
6594
6690
|
}
|
|
6691
|
+
|
|
6595
6692
|
return pointer;
|
|
6596
6693
|
}
|
|
6597
6694
|
|
|
@@ -6606,7 +6703,8 @@ function createMembraneMarshall() {
|
|
|
6606
6703
|
// istanbul ignore next
|
|
6607
6704
|
shadowTarget = // eslint-disable-next-line func-names
|
|
6608
6705
|
targetTraits & TargetTraits.IsArrowFunction ? () => {} : function () {};
|
|
6609
|
-
|
|
6706
|
+
|
|
6707
|
+
if (DEBUG_MODE) {
|
|
6610
6708
|
// This is only really needed for debugging,
|
|
6611
6709
|
// it helps to identify the proxy by name
|
|
6612
6710
|
ReflectDefineProperty(shadowTarget, 'name', {
|
|
@@ -6624,9 +6722,9 @@ function createMembraneMarshall() {
|
|
|
6624
6722
|
}
|
|
6625
6723
|
|
|
6626
6724
|
return shadowTarget;
|
|
6627
|
-
} //
|
|
6628
|
-
// to cross the callable boundary in a try/catch, instead,
|
|
6629
|
-
// via the membrane artifacts.
|
|
6725
|
+
} // This is needed even when using ShadowRealm, because the errors are
|
|
6726
|
+
// not going to cross the callable boundary in a try/catch, instead,
|
|
6727
|
+
// they need to be ported via the membrane artifacts.
|
|
6630
6728
|
|
|
6631
6729
|
|
|
6632
6730
|
function foreignErrorControl(foreignFn) {
|
|
@@ -6636,11 +6734,11 @@ function createMembraneMarshall() {
|
|
|
6636
6734
|
} catch (e) {
|
|
6637
6735
|
const pushedError = getSelectedTarget();
|
|
6638
6736
|
|
|
6639
|
-
if (pushedError) {
|
|
6640
|
-
throw
|
|
6737
|
+
if (pushedError === undefined) {
|
|
6738
|
+
throw new TypeErrorCtor(e == null ? void 0 : e.message);
|
|
6641
6739
|
}
|
|
6642
6740
|
|
|
6643
|
-
throw
|
|
6741
|
+
throw pushedError;
|
|
6644
6742
|
}
|
|
6645
6743
|
};
|
|
6646
6744
|
}
|
|
@@ -6855,19 +6953,36 @@ function createMembraneMarshall() {
|
|
|
6855
6953
|
|
|
6856
6954
|
return fn;
|
|
6857
6955
|
}
|
|
6858
|
-
/**
|
|
6859
|
-
* An object is marked as a "live" object when it has a
|
|
6860
|
-
* LOCKER_LIVE_MARKER_SYMBOL property. Live objects have their
|
|
6861
|
-
* defineProperty, deleteProperty, preventExtensions, set, and
|
|
6862
|
-
* setPrototypeOf proxy traps as "live" variations meaning that when
|
|
6863
|
-
* mutation occurs instead of maintaining a separate object graph of
|
|
6864
|
-
* changes the mutations are performed directly on the foreign target.
|
|
6865
|
-
*
|
|
6866
|
-
*/
|
|
6867
6956
|
|
|
6957
|
+
function isLiveTarget(target) {
|
|
6958
|
+
if (target === ObjectProto) {
|
|
6959
|
+
return false;
|
|
6960
|
+
}
|
|
6961
|
+
|
|
6962
|
+
if (typeof target === 'object') {
|
|
6963
|
+
if ( // We only check for typed arrays here since arrays are
|
|
6964
|
+
// marked as live in the BoundaryProxyHandler constructor.
|
|
6965
|
+
ArrayBufferIsView(target)) {
|
|
6966
|
+
return true;
|
|
6967
|
+
}
|
|
6968
|
+
|
|
6969
|
+
const {
|
|
6970
|
+
constructor
|
|
6971
|
+
} = target;
|
|
6972
|
+
|
|
6973
|
+
if (constructor === ObjectCtor) {
|
|
6974
|
+
// If the constructor, own or inherited, points to `Object`
|
|
6975
|
+
// then `value` is not likely a prototype object.
|
|
6976
|
+
return true;
|
|
6977
|
+
}
|
|
6868
6978
|
|
|
6869
|
-
|
|
6870
|
-
|
|
6979
|
+
if (ReflectGetPrototypeOf(target) === null) {
|
|
6980
|
+
// Ensure `value` is not an `Object.prototype` from an iframe.
|
|
6981
|
+
return typeof constructor !== 'function' || constructor.prototype !== target;
|
|
6982
|
+
}
|
|
6983
|
+
}
|
|
6984
|
+
|
|
6985
|
+
return ReflectApply(ObjectProtoHasOwnProperty, target, [LOCKER_LIVE_MARKER_SYMBOL]);
|
|
6871
6986
|
}
|
|
6872
6987
|
/**
|
|
6873
6988
|
* An object is marked as a "magic" object when it has a
|
|
@@ -7107,7 +7222,7 @@ function createMembraneMarshall() {
|
|
|
7107
7222
|
}
|
|
7108
7223
|
|
|
7109
7224
|
function liveSetPrototypeOf(foreignTargetPointer, proto) {
|
|
7110
|
-
const transferableProto =
|
|
7225
|
+
const transferableProto = proto ? getTransferablePointer(proto) : proto;
|
|
7111
7226
|
return foreignCallableSetPrototypeOf(foreignTargetPointer, transferableProto);
|
|
7112
7227
|
}
|
|
7113
7228
|
|
|
@@ -7121,10 +7236,10 @@ function createMembraneMarshall() {
|
|
|
7121
7236
|
}
|
|
7122
7237
|
|
|
7123
7238
|
function pushErrorAcrossBoundary(e) {
|
|
7124
|
-
const
|
|
7239
|
+
const foreignErrorPointer = getTransferableValue(e);
|
|
7125
7240
|
|
|
7126
|
-
if (typeof
|
|
7127
|
-
|
|
7241
|
+
if (typeof foreignErrorPointer === 'function') {
|
|
7242
|
+
foreignErrorPointer();
|
|
7128
7243
|
}
|
|
7129
7244
|
|
|
7130
7245
|
return e;
|
|
@@ -7237,6 +7352,8 @@ function createMembraneMarshall() {
|
|
|
7237
7352
|
// because it is not expecting to change in the future.
|
|
7238
7353
|
// future optimization: hoping that proxies with frozen handlers can be faster
|
|
7239
7354
|
ObjectFreeze(this);
|
|
7355
|
+
} else if (foreignTargetTraits & TargetTraits.IsArray) {
|
|
7356
|
+
this.makeProxyLive();
|
|
7240
7357
|
}
|
|
7241
7358
|
} // internal utilities
|
|
7242
7359
|
|
|
@@ -7259,6 +7376,13 @@ function createMembraneMarshall() {
|
|
|
7259
7376
|
const {
|
|
7260
7377
|
foreignTargetPointer
|
|
7261
7378
|
} = this;
|
|
7379
|
+
|
|
7380
|
+
if (DEBUG_MODE) {
|
|
7381
|
+
try {
|
|
7382
|
+
foreignCallableWarn('Mutations on the membrane of an object originating ' + 'outside of the sandbox will not be reflected on ' + 'the object itself:', foreignTargetPointer); // eslint-disable-next-line no-empty
|
|
7383
|
+
} catch (_unused5) {}
|
|
7384
|
+
}
|
|
7385
|
+
|
|
7262
7386
|
const targetIntegrityTraits = foreignCallableGetTargetIntegrityTraits(foreignTargetPointer);
|
|
7263
7387
|
|
|
7264
7388
|
if (targetIntegrityTraits & TargetIntegrityTraits.Revoked) {
|
|
@@ -7274,7 +7398,7 @@ function createMembraneMarshall() {
|
|
|
7274
7398
|
// can break the membrane, therefore we need protection
|
|
7275
7399
|
const proto = liveGetPrototypeOf(foreignTargetPointer);
|
|
7276
7400
|
ReflectSetPrototypeOf(shadowTarget, proto);
|
|
7277
|
-
} catch (
|
|
7401
|
+
} catch (_unused6) {
|
|
7278
7402
|
// TODO: is revoke the right action here? maybe just setting
|
|
7279
7403
|
// proto to null instead?
|
|
7280
7404
|
this.revoke();
|
|
@@ -7313,7 +7437,7 @@ function createMembraneMarshall() {
|
|
|
7313
7437
|
|
|
7314
7438
|
makeProxyUnambiguous(shadowTarget) {
|
|
7315
7439
|
// assert: trapMutations must be true
|
|
7316
|
-
if (
|
|
7440
|
+
if (foreignCallableIsLiveTarget(this.foreignTargetPointer)) {
|
|
7317
7441
|
this.makeProxyLive();
|
|
7318
7442
|
} else {
|
|
7319
7443
|
this.makeProxyStatic(shadowTarget);
|
|
@@ -7523,7 +7647,7 @@ function createMembraneMarshall() {
|
|
|
7523
7647
|
}, // callableEvaluate
|
|
7524
7648
|
sourceText => {
|
|
7525
7649
|
try {
|
|
7526
|
-
return getTransferableValue(
|
|
7650
|
+
return getTransferableValue(localEval(sourceText));
|
|
7527
7651
|
} catch (e) {
|
|
7528
7652
|
throw pushErrorAcrossBoundary(e);
|
|
7529
7653
|
}
|
|
@@ -7548,17 +7672,39 @@ function createMembraneMarshall() {
|
|
|
7548
7672
|
ReflectApply(WeakMapProtoSet, proxyTargetToPointerMap, [proxy, foreignTargetPointer]);
|
|
7549
7673
|
return createPointer(proxy);
|
|
7550
7674
|
}, // callableApply
|
|
7551
|
-
instrumentCallableWrapper((targetPointer,
|
|
7552
|
-
targetPointer();
|
|
7553
|
-
|
|
7554
|
-
const
|
|
7675
|
+
instrumentCallableWrapper((targetPointer, thisArgPointerOrPrimitive, ...listOfPointersOrPrimitives) => {
|
|
7676
|
+
targetPointer(); // Inline getSelectedTarget().
|
|
7677
|
+
|
|
7678
|
+
const fn = selectedTarget;
|
|
7679
|
+
selectedTarget = undefined; // Inline getLocalValue().
|
|
7680
|
+
|
|
7681
|
+
let thisArg = thisArgPointerOrPrimitive;
|
|
7682
|
+
|
|
7683
|
+
if (typeof thisArgPointerOrPrimitive === 'function') {
|
|
7684
|
+
thisArgPointerOrPrimitive(); // Inline getSelectedTarget().
|
|
7685
|
+
|
|
7686
|
+
thisArg = selectedTarget;
|
|
7687
|
+
selectedTarget = undefined;
|
|
7688
|
+
}
|
|
7689
|
+
|
|
7555
7690
|
const {
|
|
7556
7691
|
length: argsLen
|
|
7557
|
-
} =
|
|
7692
|
+
} = listOfPointersOrPrimitives;
|
|
7558
7693
|
const args = new ArrayCtor(argsLen);
|
|
7559
7694
|
|
|
7560
7695
|
for (let i = 0, len = argsLen; i < len; i += 1) {
|
|
7561
|
-
|
|
7696
|
+
const pointerOrPrimitive = listOfPointersOrPrimitives[i]; // Inline getLocalValue().
|
|
7697
|
+
|
|
7698
|
+
let localValue = pointerOrPrimitive;
|
|
7699
|
+
|
|
7700
|
+
if (typeof pointerOrPrimitive === 'function') {
|
|
7701
|
+
pointerOrPrimitive(); // Inline getSelectedTarget().
|
|
7702
|
+
|
|
7703
|
+
localValue = selectedTarget;
|
|
7704
|
+
selectedTarget = undefined;
|
|
7705
|
+
}
|
|
7706
|
+
|
|
7707
|
+
args[i] = localValue;
|
|
7562
7708
|
}
|
|
7563
7709
|
|
|
7564
7710
|
let value;
|
|
@@ -7567,21 +7713,51 @@ function createMembraneMarshall() {
|
|
|
7567
7713
|
value = ReflectApply(fn, thisArg, args);
|
|
7568
7714
|
} catch (e) {
|
|
7569
7715
|
throw pushErrorAcrossBoundary(e);
|
|
7716
|
+
} // Inline getTransferableValue().
|
|
7717
|
+
|
|
7718
|
+
|
|
7719
|
+
if (typeof value === 'undefined') {
|
|
7720
|
+
return undefined;
|
|
7570
7721
|
}
|
|
7571
7722
|
|
|
7572
|
-
|
|
7723
|
+
if (value === null || typeof value !== 'function' && typeof value !== 'object') {
|
|
7724
|
+
return value;
|
|
7725
|
+
}
|
|
7726
|
+
|
|
7727
|
+
return getTransferablePointer(value);
|
|
7573
7728
|
}, 'callableApply', INBOUND_INSTRUMENTATION_LABEL), // callableConstruct
|
|
7574
|
-
instrumentCallableWrapper((targetPointer, newTargetPointerOrValue, ...
|
|
7575
|
-
targetPointer();
|
|
7576
|
-
|
|
7577
|
-
const
|
|
7729
|
+
instrumentCallableWrapper((targetPointer, newTargetPointerOrValue, ...listOfPointersOrPrimitives) => {
|
|
7730
|
+
targetPointer(); // Inline getSelectedTarget().
|
|
7731
|
+
|
|
7732
|
+
const constructor = selectedTarget; // Inline getLocalValue().
|
|
7733
|
+
|
|
7734
|
+
let newTarget = newTargetPointerOrValue;
|
|
7735
|
+
|
|
7736
|
+
if (typeof newTargetPointerOrValue === 'function') {
|
|
7737
|
+
newTargetPointerOrValue(); // Inline getSelectedTarget().
|
|
7738
|
+
|
|
7739
|
+
newTarget = selectedTarget;
|
|
7740
|
+
selectedTarget = undefined;
|
|
7741
|
+
}
|
|
7742
|
+
|
|
7578
7743
|
const {
|
|
7579
7744
|
length: argsLen
|
|
7580
|
-
} =
|
|
7745
|
+
} = listOfPointersOrPrimitives;
|
|
7581
7746
|
const args = new ArrayCtor(argsLen);
|
|
7582
7747
|
|
|
7583
7748
|
for (let i = 0, len = argsLen; i < len; i += 1) {
|
|
7584
|
-
|
|
7749
|
+
const pointerOrPrimitive = listOfPointersOrPrimitives[i]; // Inline getLocalValue().
|
|
7750
|
+
|
|
7751
|
+
let localValue = pointerOrPrimitive;
|
|
7752
|
+
|
|
7753
|
+
if (typeof pointerOrPrimitive === 'function') {
|
|
7754
|
+
pointerOrPrimitive(); // Inline getSelectedTarget().
|
|
7755
|
+
|
|
7756
|
+
localValue = selectedTarget;
|
|
7757
|
+
selectedTarget = undefined;
|
|
7758
|
+
}
|
|
7759
|
+
|
|
7760
|
+
args[i] = localValue;
|
|
7585
7761
|
}
|
|
7586
7762
|
|
|
7587
7763
|
let value;
|
|
@@ -7590,9 +7766,18 @@ function createMembraneMarshall() {
|
|
|
7590
7766
|
value = ReflectConstruct(constructor, args, newTarget);
|
|
7591
7767
|
} catch (e) {
|
|
7592
7768
|
throw pushErrorAcrossBoundary(e);
|
|
7769
|
+
} // Inline getTransferableValue().
|
|
7770
|
+
|
|
7771
|
+
|
|
7772
|
+
if (typeof value === 'undefined') {
|
|
7773
|
+
return undefined;
|
|
7774
|
+
}
|
|
7775
|
+
|
|
7776
|
+
if (value === null || typeof value !== 'function' && typeof value !== 'object') {
|
|
7777
|
+
return value;
|
|
7593
7778
|
}
|
|
7594
7779
|
|
|
7595
|
-
return
|
|
7780
|
+
return getTransferablePointer(value);
|
|
7596
7781
|
}, 'callableConstruct', INBOUND_INSTRUMENTATION_LABEL), // callableDefineProperty
|
|
7597
7782
|
instrumentCallableWrapper((targetPointer, key, configurable, enumerable, writable, valuePointer, getPointer, setPointer) => {
|
|
7598
7783
|
targetPointer();
|
|
@@ -7647,7 +7832,7 @@ function createMembraneMarshall() {
|
|
|
7647
7832
|
throw pushErrorAcrossBoundary(e);
|
|
7648
7833
|
}
|
|
7649
7834
|
|
|
7650
|
-
return
|
|
7835
|
+
return proto ? getTransferablePointer(proto) : proto;
|
|
7651
7836
|
}, 'callableGetPrototypeOf', INBOUND_INSTRUMENTATION_LABEL), // callableIsExtensible
|
|
7652
7837
|
instrumentCallableWrapper(targetPointer => {
|
|
7653
7838
|
targetPointer();
|
|
@@ -7702,7 +7887,47 @@ function createMembraneMarshall() {
|
|
|
7702
7887
|
} catch (e) {
|
|
7703
7888
|
throw pushErrorAcrossBoundary(e);
|
|
7704
7889
|
}
|
|
7705
|
-
}, 'callableSetPrototypeOf', INBOUND_INSTRUMENTATION_LABEL), //
|
|
7890
|
+
}, 'callableSetPrototypeOf', INBOUND_INSTRUMENTATION_LABEL), // callableGetOwnPropertyDescriptors
|
|
7891
|
+
instrumentCallableWrapper((targetPointer, foreignCallableDescriptorsCallback) => {
|
|
7892
|
+
targetPointer();
|
|
7893
|
+
const target = getSelectedTarget();
|
|
7894
|
+
let unsafeDescMap;
|
|
7895
|
+
|
|
7896
|
+
try {
|
|
7897
|
+
unsafeDescMap = ObjectGetOwnPropertyDescriptors(target);
|
|
7898
|
+
} catch (e) {
|
|
7899
|
+
throw pushErrorAcrossBoundary(e);
|
|
7900
|
+
}
|
|
7901
|
+
|
|
7902
|
+
const keys = ReflectOwnKeys(unsafeDescMap);
|
|
7903
|
+
const {
|
|
7904
|
+
length: keysLen
|
|
7905
|
+
} = keys;
|
|
7906
|
+
const descriptorTuples = new ArrayCtor(keysLen * 7); // prettier-ignore
|
|
7907
|
+
|
|
7908
|
+
for (let i = 0, j = 0, len = keysLen; i < len; i += 1, j += 7) {
|
|
7909
|
+
const key = keys[i];
|
|
7910
|
+
const unsafeDesc = unsafeDescMap[key];
|
|
7911
|
+
const safeDesc = toSafeDescriptor(unsafeDesc);
|
|
7912
|
+
const {
|
|
7913
|
+
configurable,
|
|
7914
|
+
enumerable,
|
|
7915
|
+
writable,
|
|
7916
|
+
value,
|
|
7917
|
+
get,
|
|
7918
|
+
set
|
|
7919
|
+
} = safeDesc;
|
|
7920
|
+
descriptorTuples[j] = key;
|
|
7921
|
+
descriptorTuples[j + 1] = 'configurable' in safeDesc ? configurable : UNDEFINED_SYMBOL;
|
|
7922
|
+
descriptorTuples[j + 2] = 'enumerable' in safeDesc ? enumerable : UNDEFINED_SYMBOL;
|
|
7923
|
+
descriptorTuples[j + 3] = 'writable' in safeDesc ? writable : UNDEFINED_SYMBOL;
|
|
7924
|
+
descriptorTuples[j + 4] = 'value' in safeDesc ? getTransferableValue(value) : UNDEFINED_SYMBOL;
|
|
7925
|
+
descriptorTuples[j + 5] = 'get' in safeDesc ? getTransferableValue(get) : UNDEFINED_SYMBOL;
|
|
7926
|
+
descriptorTuples[j + 6] = 'set' in safeDesc ? getTransferableValue(set) : UNDEFINED_SYMBOL;
|
|
7927
|
+
}
|
|
7928
|
+
|
|
7929
|
+
ReflectApply(foreignCallableDescriptorsCallback, undefined, descriptorTuples);
|
|
7930
|
+
}, 'callableGetOwnPropertyDescriptors', INBOUND_INSTRUMENTATION_LABEL), // callableGetTargetIntegrityTraits
|
|
7706
7931
|
instrumentCallableWrapper(targetPointer => {
|
|
7707
7932
|
targetPointer();
|
|
7708
7933
|
const target = getSelectedTarget();
|
|
@@ -7721,7 +7946,7 @@ function createMembraneMarshall() {
|
|
|
7721
7946
|
return ReflectApply(StringProtoSlice, toStringValue, [8, -1]);
|
|
7722
7947
|
} // eslint-disable-next-line no-empty
|
|
7723
7948
|
|
|
7724
|
-
} catch (
|
|
7949
|
+
} catch (_unused7) {}
|
|
7725
7950
|
|
|
7726
7951
|
return undefined;
|
|
7727
7952
|
}, 'callableGetUnbrandedTag', INBOUND_INSTRUMENTATION_LABEL), // callableHasOwnProperty
|
|
@@ -7734,7 +7959,28 @@ function createMembraneMarshall() {
|
|
|
7734
7959
|
} catch (e) {
|
|
7735
7960
|
throw pushErrorAcrossBoundary(e);
|
|
7736
7961
|
}
|
|
7737
|
-
}, 'callableHasOwnProperty', INBOUND_INSTRUMENTATION_LABEL)
|
|
7962
|
+
}, 'callableHasOwnProperty', INBOUND_INSTRUMENTATION_LABEL), // callableIsLiveTarget
|
|
7963
|
+
instrumentCallableWrapper(targetPointer => {
|
|
7964
|
+
targetPointer();
|
|
7965
|
+
const target = getSelectedTarget();
|
|
7966
|
+
|
|
7967
|
+
try {
|
|
7968
|
+
return isLiveTarget(target);
|
|
7969
|
+
} catch (e) {
|
|
7970
|
+
throw pushErrorAcrossBoundary(e);
|
|
7971
|
+
}
|
|
7972
|
+
}, 'callableIsLiveTarget', INBOUND_INSTRUMENTATION_LABEL), // callableWarn
|
|
7973
|
+
instrumentCallableWrapper((...args) => {
|
|
7974
|
+
for (let i = 0, len = args.length; i < len; i += 1) {
|
|
7975
|
+
args[i] = getLocalValue(args[i]);
|
|
7976
|
+
}
|
|
7977
|
+
|
|
7978
|
+
try {
|
|
7979
|
+
ReflectApply(consoleWarn, consoleRef, args);
|
|
7980
|
+
} catch (e) {
|
|
7981
|
+
throw pushErrorAcrossBoundary(e);
|
|
7982
|
+
}
|
|
7983
|
+
}, 'callableWarn', INBOUND_INSTRUMENTATION_LABEL));
|
|
7738
7984
|
return (...hooks) => {
|
|
7739
7985
|
const {
|
|
7740
7986
|
// 0: globalThisPointer,
|
|
@@ -7755,9 +8001,12 @@ function createMembraneMarshall() {
|
|
|
7755
8001
|
15: callablePreventExtensions,
|
|
7756
8002
|
16: callableSet,
|
|
7757
8003
|
17: callableSetPrototypeOf,
|
|
7758
|
-
18:
|
|
7759
|
-
19:
|
|
7760
|
-
20:
|
|
8004
|
+
18: callableGetOwnPropertyDescriptors,
|
|
8005
|
+
19: callableGetTargetIntegrityTraits,
|
|
8006
|
+
20: callableGetUnbrandedTag,
|
|
8007
|
+
21: callableHasOwnProperty,
|
|
8008
|
+
22: callableIsLiveTarget,
|
|
8009
|
+
23: callableWarn
|
|
7761
8010
|
} = hooks;
|
|
7762
8011
|
foreignCallablePushTarget = callablePushTarget; // traps utilities
|
|
7763
8012
|
|
|
@@ -7772,9 +8021,12 @@ function createMembraneMarshall() {
|
|
|
7772
8021
|
foreignCallablePreventExtensions = foreignErrorControl(instrumentCallableWrapper(callablePreventExtensions, 'callablePreventExtensions', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
7773
8022
|
foreignCallableSet = foreignErrorControl(instrumentCallableWrapper(callableSet, 'callableSet', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
7774
8023
|
foreignCallableSetPrototypeOf = foreignErrorControl(instrumentCallableWrapper(callableSetPrototypeOf, 'callableSetPrototypeOf', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
8024
|
+
foreignCallableGetOwnPropertyDescriptors = foreignErrorControl(instrumentCallableWrapper(callableGetOwnPropertyDescriptors, 'callableGetOwnPropertyDescriptors', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
7775
8025
|
foreignCallableGetTargetIntegrityTraits = foreignErrorControl(instrumentCallableWrapper(callableGetTargetIntegrityTraits, 'callableGetTargetIntegrityTraits', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
7776
8026
|
foreignCallableGetUnbrandedTag = foreignErrorControl(instrumentCallableWrapper(callableGetUnbrandedTag, 'callableGetUnbrandedTag', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
7777
8027
|
foreignCallableHasOwnProperty = foreignErrorControl(instrumentCallableWrapper(callableHasOwnProperty, 'callableHasOwnProperty', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
8028
|
+
foreignCallableIsLiveTarget = foreignErrorControl(instrumentCallableWrapper(callableIsLiveTarget, 'callableIsLiveTarget', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
8029
|
+
foreignCallableWarn = foreignErrorControl(instrumentCallableWrapper(callableWarn, 'callableWarn', OUTBOUND_INSTRUMENTATION_LABEL));
|
|
7778
8030
|
};
|
|
7779
8031
|
};
|
|
7780
8032
|
}
|
|
@@ -7785,10 +8037,124 @@ const marshallSourceTextInStrictMode = `
|
|
|
7785
8037
|
(function(){
|
|
7786
8038
|
'use strict';
|
|
7787
8039
|
(${function initializeShadowRealm() {
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
8040
|
+
// Hook into V8 stack trace API
|
|
8041
|
+
// https://v8.dev/docs/stack-trace-api
|
|
8042
|
+
if (typeof Error.prepareStackTrace !== 'function') {
|
|
8043
|
+
const CallSite = (() => {
|
|
8044
|
+
var _callSites$;
|
|
8045
|
+
|
|
8046
|
+
Error.prepareStackTrace = (_error, callSites) => callSites;
|
|
8047
|
+
|
|
8048
|
+
const callSites = new Error().stack;
|
|
8049
|
+
delete Error.prepareStackTrace;
|
|
8050
|
+
return Array.isArray(callSites) && callSites.length > 0 ? (_callSites$ = callSites[0]) == null ? void 0 : _callSites$.constructor : undefined;
|
|
8051
|
+
})();
|
|
8052
|
+
|
|
8053
|
+
if (typeof CallSite === 'function') {
|
|
8054
|
+
// This package is bundled by third-parties that have their own
|
|
8055
|
+
// build time replacement logic. Instead of customizing each
|
|
8056
|
+
// build system to be aware of this package we perform a small
|
|
8057
|
+
// runtime check to determine whether our code is minified or in
|
|
8058
|
+
// DEBUG_MODE.
|
|
8059
|
+
// https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.debug_mode_enable
|
|
8060
|
+
const DEBUG_MODE = `${() =>
|
|
8061
|
+
/**/
|
|
8062
|
+
1}`.includes('*');
|
|
8063
|
+
const ZERO_WIDTH_JOINER = '\u200D';
|
|
8064
|
+
const LOCKER_IDENTIFIER_MARKER = `$LWS${ZERO_WIDTH_JOINER}`;
|
|
8065
|
+
const {
|
|
8066
|
+
toString: ErrorProtoToString
|
|
8067
|
+
} = Error.prototype;
|
|
8068
|
+
const {
|
|
8069
|
+
apply: ReflectApply,
|
|
8070
|
+
defineProperty: ReflectDefineProperty
|
|
8071
|
+
} = Reflect;
|
|
8072
|
+
const {
|
|
8073
|
+
endsWith: StringProtoEndsWith,
|
|
8074
|
+
includes: StringProtoIncludes
|
|
8075
|
+
} = String.prototype;
|
|
8076
|
+
const {
|
|
8077
|
+
getEvalOrigin: CallSiteProtoGetEvalOrigin,
|
|
8078
|
+
getFunctionName: CallSiteProtoGetFunctionName,
|
|
8079
|
+
toString: CallSiteProtoToString
|
|
8080
|
+
} = CallSite.prototype;
|
|
8081
|
+
|
|
8082
|
+
const formatStackTrace = function formatStackTrace(error, callSites) {
|
|
8083
|
+
// Based on V8's default stack trace formatting:
|
|
8084
|
+
// https://chromium.googlesource.com/v8/v8.git/+/refs/heads/main/src/execution/messages.cc#371
|
|
8085
|
+
let stackTrace = '';
|
|
8086
|
+
|
|
8087
|
+
try {
|
|
8088
|
+
stackTrace = ReflectApply(ErrorProtoToString, error, []);
|
|
8089
|
+
} catch (_unused8) {
|
|
8090
|
+
stackTrace = '<error>';
|
|
8091
|
+
}
|
|
8092
|
+
|
|
8093
|
+
let consecutive = false;
|
|
8094
|
+
|
|
8095
|
+
for (let i = 0, {
|
|
8096
|
+
length
|
|
8097
|
+
} = callSites; i < length; i += 1) {
|
|
8098
|
+
const callSite = callSites[i];
|
|
8099
|
+
const funcName = ReflectApply(CallSiteProtoGetFunctionName, callSite, []);
|
|
8100
|
+
let isMarked = false;
|
|
8101
|
+
|
|
8102
|
+
if (typeof funcName === 'string' && funcName !== 'eval' && ReflectApply(StringProtoEndsWith, funcName, [LOCKER_IDENTIFIER_MARKER])) {
|
|
8103
|
+
isMarked = true;
|
|
8104
|
+
}
|
|
8105
|
+
|
|
8106
|
+
if (!isMarked) {
|
|
8107
|
+
const evalOrigin = ReflectApply(CallSiteProtoGetEvalOrigin, callSite, []);
|
|
8108
|
+
|
|
8109
|
+
if (typeof evalOrigin === 'string' && ReflectApply(StringProtoIncludes, evalOrigin, [LOCKER_IDENTIFIER_MARKER])) {
|
|
8110
|
+
isMarked = true;
|
|
8111
|
+
}
|
|
8112
|
+
} // Only write a single LWS entry per consecutive LWS stacks.
|
|
8113
|
+
|
|
8114
|
+
|
|
8115
|
+
if (isMarked) {
|
|
8116
|
+
if (!consecutive) {
|
|
8117
|
+
consecutive = true;
|
|
8118
|
+
stackTrace += '\n at LWS';
|
|
8119
|
+
}
|
|
8120
|
+
|
|
8121
|
+
continue;
|
|
8122
|
+
} else {
|
|
8123
|
+
consecutive = false;
|
|
8124
|
+
}
|
|
8125
|
+
|
|
8126
|
+
try {
|
|
8127
|
+
stackTrace += `\n at ${ReflectApply(CallSiteProtoToString, callSite, [])}`; // eslint-disable-next-line no-empty
|
|
8128
|
+
} catch (_unused9) {}
|
|
8129
|
+
}
|
|
8130
|
+
|
|
8131
|
+
return stackTrace;
|
|
8132
|
+
}; // Make Error.prepareStackTrace non-configurable and non-writable.
|
|
8133
|
+
|
|
8134
|
+
|
|
8135
|
+
ReflectDefineProperty(Error, 'prepareStackTrace', {
|
|
8136
|
+
// @ts-ignore: TS doesn't like __proto__ on property descriptors.
|
|
8137
|
+
__proto__: null,
|
|
8138
|
+
enumerable: true,
|
|
8139
|
+
// Error.prepareStackTrace cannot be a bound or proxy wrapped
|
|
8140
|
+
// function, so to obscure its source we wrap the call to
|
|
8141
|
+
// formatStackTrace().
|
|
8142
|
+
value: function prepareStackTrace(error, callSites) {
|
|
8143
|
+
return formatStackTrace(error, callSites);
|
|
8144
|
+
}
|
|
8145
|
+
}); // Make Error.stackTraceLimit configurable and writable in DEBUG_MODE.
|
|
8146
|
+
|
|
8147
|
+
ReflectDefineProperty(Error, 'stackTraceLimit', {
|
|
8148
|
+
// @ts-ignore: TS doesn't like __proto__ on property descriptors.
|
|
8149
|
+
__proto__: null,
|
|
8150
|
+
configurable: DEBUG_MODE,
|
|
8151
|
+
enumerable: true,
|
|
8152
|
+
// The default stack trace limit is 10.
|
|
8153
|
+
// Increasing to 20 for wiggle room of filtered results.
|
|
8154
|
+
value: 20,
|
|
8155
|
+
writable: DEBUG_MODE
|
|
8156
|
+
});
|
|
8157
|
+
}
|
|
7792
8158
|
}
|
|
7793
8159
|
}.toString()})();
|
|
7794
8160
|
return (${createMembraneMarshall.toString()})
|
|
@@ -7838,7 +8204,7 @@ function capitalizeFirstChar(string) {
|
|
|
7838
8204
|
class VirtualEnvironment {
|
|
7839
8205
|
constructor(options) {
|
|
7840
8206
|
if (options === undefined) {
|
|
7841
|
-
throw new ErrorCtor(
|
|
8207
|
+
throw new ErrorCtor('Missing VirtualEnvironmentOptions options bag.');
|
|
7842
8208
|
}
|
|
7843
8209
|
|
|
7844
8210
|
const {
|
|
@@ -7853,7 +8219,9 @@ class VirtualEnvironment {
|
|
|
7853
8219
|
let supportFlags = SupportFlagsEnum.None;
|
|
7854
8220
|
const supportKeys = support ? ObjectKeys(support) : [];
|
|
7855
8221
|
|
|
7856
|
-
for (let i = 0,
|
|
8222
|
+
for (let i = 0, {
|
|
8223
|
+
length
|
|
8224
|
+
} = supportKeys; i < length; i += 1) {
|
|
7857
8225
|
const enumKey = capitalizeFirstChar(supportKeys[i]);
|
|
7858
8226
|
supportFlags |= SupportFlagsEnum[enumKey];
|
|
7859
8227
|
}
|
|
@@ -7920,14 +8288,14 @@ class VirtualEnvironment {
|
|
|
7920
8288
|
|
|
7921
8289
|
evaluate(sourceText) {
|
|
7922
8290
|
try {
|
|
7923
|
-
const
|
|
8291
|
+
const bluePointerOrPrimitiveValue = this.redCallableEvaluate(sourceText);
|
|
7924
8292
|
|
|
7925
|
-
if (typeof
|
|
7926
|
-
|
|
8293
|
+
if (typeof bluePointerOrPrimitiveValue === 'function') {
|
|
8294
|
+
bluePointerOrPrimitiveValue();
|
|
7927
8295
|
return this.blueGetSelectedTarget();
|
|
7928
8296
|
}
|
|
7929
8297
|
|
|
7930
|
-
return
|
|
8298
|
+
return bluePointerOrPrimitiveValue;
|
|
7931
8299
|
} catch (e) {
|
|
7932
8300
|
const pushedError = this.blueGetSelectedTarget();
|
|
7933
8301
|
|
|
@@ -7943,7 +8311,9 @@ class VirtualEnvironment {
|
|
|
7943
8311
|
let bluePointer = this.blueGlobalThisPointer;
|
|
7944
8312
|
let redPointer = this.redGlobalThisPointer;
|
|
7945
8313
|
|
|
7946
|
-
for (let i = 0,
|
|
8314
|
+
for (let i = 0, {
|
|
8315
|
+
length
|
|
8316
|
+
} = keys; i < length; i += 1) {
|
|
7947
8317
|
const key = keys[i];
|
|
7948
8318
|
bluePointer = this.blueCallableGetPropertyValuePointer(bluePointer, key);
|
|
7949
8319
|
redPointer = this.redCallableGetPropertyValuePointer(redPointer, key);
|
|
@@ -7953,27 +8323,31 @@ class VirtualEnvironment {
|
|
|
7953
8323
|
this.blueCallableLinkPointers(bluePointer, redPointer);
|
|
7954
8324
|
}
|
|
7955
8325
|
|
|
7956
|
-
remap(target,
|
|
7957
|
-
const
|
|
8326
|
+
remap(target, unsafeBlueDescMap) {
|
|
8327
|
+
const ownKeys = ReflectOwnKeys$1(unsafeBlueDescMap);
|
|
7958
8328
|
const targetPointer = this.blueGetTransferableValue(target); // prettier-ignore
|
|
7959
8329
|
|
|
7960
|
-
for (let i = 0,
|
|
7961
|
-
|
|
7962
|
-
|
|
8330
|
+
for (let i = 0, {
|
|
8331
|
+
length
|
|
8332
|
+
} = ownKeys; i < length; i += 1) {
|
|
8333
|
+
const ownKey = ownKeys[i];
|
|
8334
|
+
const unsafeBlueDesc = unsafeBlueDescMap[ownKey]; // Avoid poisoning by only installing own properties from unsafeBlueDescMap.
|
|
8335
|
+
// We don't use a toSafeDescriptor() style helper since that mutates
|
|
8336
|
+
// the unsafeBlueDesc.
|
|
7963
8337
|
// eslint-disable-next-line prefer-object-spread
|
|
7964
8338
|
|
|
7965
8339
|
const safeBlueDesc = ObjectAssign$2({
|
|
7966
8340
|
__proto__: null
|
|
7967
8341
|
}, unsafeBlueDesc); // Install descriptor into the red side.
|
|
7968
8342
|
|
|
7969
|
-
this.redCallableDefineProperty(targetPointer,
|
|
8343
|
+
this.redCallableDefineProperty(targetPointer, ownKey, 'configurable' in safeBlueDesc ? !!safeBlueDesc.configurable : UNDEFINED_SYMBOL, 'enumerable' in safeBlueDesc ? !!safeBlueDesc.enumerable : UNDEFINED_SYMBOL, 'writable' in safeBlueDesc ? !!safeBlueDesc.writable : UNDEFINED_SYMBOL, 'value' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.value) : UNDEFINED_SYMBOL, 'get' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.get) : UNDEFINED_SYMBOL, 'set' in safeBlueDesc ? this.blueGetTransferableValue(safeBlueDesc.set) : UNDEFINED_SYMBOL);
|
|
7970
8344
|
}
|
|
7971
8345
|
}
|
|
7972
8346
|
|
|
7973
8347
|
remapProto(target, proto) {
|
|
7974
|
-
const
|
|
7975
|
-
const
|
|
7976
|
-
this.redCallableSetPrototypeOf(
|
|
8348
|
+
const foreignTargetPointer = this.blueGetTransferableValue(target);
|
|
8349
|
+
const transferableProto = proto ? this.blueGetTransferableValue(proto) : proto;
|
|
8350
|
+
this.redCallableSetPrototypeOf(foreignTargetPointer, transferableProto);
|
|
7977
8351
|
}
|
|
7978
8352
|
|
|
7979
8353
|
}
|
|
@@ -7981,9 +8355,6 @@ class VirtualEnvironment {
|
|
|
7981
8355
|
const {
|
|
7982
8356
|
includes: ArrayProtoIncludes
|
|
7983
8357
|
} = Array.prototype;
|
|
7984
|
-
const {
|
|
7985
|
-
has: SetProtoHas
|
|
7986
|
-
} = Set.prototype;
|
|
7987
8358
|
const {
|
|
7988
8359
|
apply: ReflectApply$2,
|
|
7989
8360
|
getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor,
|
|
@@ -8009,40 +8380,69 @@ const {
|
|
|
8009
8380
|
* can be considered equivalents (without identity discontinuity).
|
|
8010
8381
|
*/
|
|
8011
8382
|
|
|
8012
|
-
const ESGlobalKeys =
|
|
8383
|
+
const ESGlobalKeys = [// *** 19.1 Value Properties of the Global Object
|
|
8013
8384
|
'globalThis', 'Infinity', 'NaN', 'undefined', // *** 19.2 Function Properties of the Global Object
|
|
8014
|
-
'eval',
|
|
8015
|
-
'
|
|
8016
|
-
|
|
8017
|
-
|
|
8385
|
+
// 'eval', // dangerous & Reflective
|
|
8386
|
+
'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', // *** 19.3 Constructor Properties of the Global Object
|
|
8387
|
+
// 'AggregateError', // Reflective
|
|
8388
|
+
// 'Array', // Reflective
|
|
8389
|
+
// 'ArrayBuffer', // Remapped
|
|
8390
|
+
'BigInt', // 'BigInt64Array', // Remapped
|
|
8391
|
+
// 'BigUint64Array', // Remapped
|
|
8392
|
+
'Boolean', // 'DataView', // Remapped
|
|
8393
|
+
// 'Date', // Remapped
|
|
8394
|
+
// 'Error', // Reflective
|
|
8395
|
+
// 'EvalError', // Reflective
|
|
8396
|
+
'FinalizationRegistry', // 'Float32Array', // Remapped
|
|
8397
|
+
// 'Float64Array', // Remapped
|
|
8398
|
+
// 'Function', // dangerous & Reflective
|
|
8399
|
+
// 'Int8Array', // Remapped
|
|
8400
|
+
// 'Int16Array', // Remapped
|
|
8401
|
+
// 'Int32Array', // Remapped
|
|
8402
|
+
// 'Map', // Remapped
|
|
8403
|
+
'Number', // 'Object', // Reflective
|
|
8404
|
+
// Allow Blue `Promise` constructor to overwrite the Red one so that promises
|
|
8018
8405
|
// created by the `Promise` constructor or APIs like `fetch` will work.
|
|
8019
8406
|
// 'Promise', // Remapped
|
|
8020
|
-
|
|
8021
|
-
|
|
8407
|
+
// 'Proxy', // Reflective
|
|
8408
|
+
// 'RangeError', // Reflective
|
|
8409
|
+
// 'ReferenceError', // Reflective
|
|
8410
|
+
'RegExp', // 'Set', // Remapped
|
|
8411
|
+
// 'SharedArrayBuffer', // Remapped
|
|
8412
|
+
'String', 'Symbol', // 'SyntaxError', // Reflective
|
|
8413
|
+
// 'TypeError', // Reflective
|
|
8414
|
+
// 'Uint8Array', // Remapped
|
|
8415
|
+
// 'Uint8ClampedArray', // Remapped
|
|
8416
|
+
// 'Uint16Array', // Remapped
|
|
8417
|
+
// 'Uint32Array', // Remapped
|
|
8418
|
+
// 'URIError', // Reflective
|
|
8419
|
+
// 'WeakMap', // Remapped
|
|
8022
8420
|
// 'WeakSet', // Remapped
|
|
8023
8421
|
'WeakRef', // *** 18.4 Other Properties of the Global Object
|
|
8024
|
-
'Atomics',
|
|
8422
|
+
// 'Atomics', // Remapped
|
|
8423
|
+
'JSON', 'Math', 'Reflect', // *** Annex B
|
|
8025
8424
|
'escape', 'unescape' // *** ECMA-402
|
|
8026
|
-
// 'Intl', //
|
|
8027
|
-
]
|
|
8425
|
+
// 'Intl', // Remapped
|
|
8426
|
+
]; // These are foundational things that should never be wrapped but are equivalent
|
|
8028
8427
|
// TODO: revisit this list.
|
|
8029
8428
|
|
|
8030
8429
|
const ReflectiveIntrinsicObjectNames = ['AggregateError', 'Array', 'Error', 'EvalError', 'Function', 'Object', 'Proxy', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', 'eval'];
|
|
8430
|
+
const ESGlobalsAndReflectiveIntrinsicObjectNames = [...ESGlobalKeys, ...ReflectiveIntrinsicObjectNames];
|
|
8031
8431
|
|
|
8032
8432
|
function assignFilteredGlobalObjectShapeDescriptors(descriptorMap, source) {
|
|
8033
|
-
const
|
|
8433
|
+
const ownKeys = ReflectOwnKeys(source);
|
|
8034
8434
|
|
|
8035
|
-
for (let i = 0,
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
const
|
|
8435
|
+
for (let i = 0, {
|
|
8436
|
+
length
|
|
8437
|
+
} = ownKeys; i < length; i += 1) {
|
|
8438
|
+
const ownKey = ownKeys[i]; // Avoid overriding ECMAScript global names that correspond
|
|
8039
8439
|
// to global intrinsics. This guarantee that those entries
|
|
8040
8440
|
// will be ignored if present in the endowments object.
|
|
8041
8441
|
// TODO: what if the intent is to polyfill one of those
|
|
8042
8442
|
// intrinsics?
|
|
8043
8443
|
|
|
8044
|
-
if (!ReflectApply$2(
|
|
8045
|
-
const unsafeDesc = ReflectGetOwnPropertyDescriptor(source,
|
|
8444
|
+
if (!ReflectApply$2(ArrayProtoIncludes, ESGlobalsAndReflectiveIntrinsicObjectNames, [ownKey])) {
|
|
8445
|
+
const unsafeDesc = ReflectGetOwnPropertyDescriptor(source, ownKey); // Safari 14.0.x (macOS) and 14.2 (iOS) have a bug where 'showModalDialog'
|
|
8046
8446
|
// is returned in the list of own keys produces by ReflectOwnKeys(iframeWindow),
|
|
8047
8447
|
// however 'showModalDialog' is not an own property and produces
|
|
8048
8448
|
// undefined at ReflectGetOwnPropertyDescriptor(window, key);
|
|
@@ -8054,7 +8454,7 @@ function assignFilteredGlobalObjectShapeDescriptors(descriptorMap, source) {
|
|
|
8054
8454
|
// ignore the entry and continue.
|
|
8055
8455
|
|
|
8056
8456
|
if (unsafeDesc) {
|
|
8057
|
-
descriptorMap[
|
|
8457
|
+
descriptorMap[ownKey] = unsafeDesc;
|
|
8058
8458
|
}
|
|
8059
8459
|
}
|
|
8060
8460
|
}
|
|
@@ -8062,9 +8462,27 @@ function assignFilteredGlobalObjectShapeDescriptors(descriptorMap, source) {
|
|
|
8062
8462
|
return descriptorMap;
|
|
8063
8463
|
}
|
|
8064
8464
|
|
|
8465
|
+
function getResolvedShapeDescriptors(...sources) {
|
|
8466
|
+
const unsafeDescMap = {};
|
|
8467
|
+
|
|
8468
|
+
for (let i = 0, {
|
|
8469
|
+
length
|
|
8470
|
+
} = sources; i < length; i += 1) {
|
|
8471
|
+
const source = sources[i];
|
|
8472
|
+
|
|
8473
|
+
if (source) {
|
|
8474
|
+
assignFilteredGlobalObjectShapeDescriptors(unsafeDescMap, source);
|
|
8475
|
+
}
|
|
8476
|
+
}
|
|
8477
|
+
|
|
8478
|
+
return unsafeDescMap;
|
|
8479
|
+
}
|
|
8480
|
+
|
|
8065
8481
|
function linkIntrinsics(env, globalObjectVirtualizationTarget) {
|
|
8066
|
-
// remapping intrinsics that are realm
|
|
8067
|
-
for (let i = 0,
|
|
8482
|
+
// remapping intrinsics that are realm agnostic
|
|
8483
|
+
for (let i = 0, {
|
|
8484
|
+
length
|
|
8485
|
+
} = ReflectiveIntrinsicObjectNames; i < length; i += 1) {
|
|
8068
8486
|
const globalName = ReflectiveIntrinsicObjectNames[i];
|
|
8069
8487
|
const reflectiveValue = globalObjectVirtualizationTarget[globalName];
|
|
8070
8488
|
|
|
@@ -8078,20 +8496,6 @@ function linkIntrinsics(env, globalObjectVirtualizationTarget) {
|
|
|
8078
8496
|
}
|
|
8079
8497
|
}
|
|
8080
8498
|
|
|
8081
|
-
function getResolvedShapeDescriptors(...sources) {
|
|
8082
|
-
const descriptors = {};
|
|
8083
|
-
|
|
8084
|
-
for (let i = 0, len = sources.length; i < len; i += 1) {
|
|
8085
|
-
const source = sources[i];
|
|
8086
|
-
|
|
8087
|
-
if (source) {
|
|
8088
|
-
assignFilteredGlobalObjectShapeDescriptors(descriptors, source);
|
|
8089
|
-
}
|
|
8090
|
-
}
|
|
8091
|
-
|
|
8092
|
-
return descriptors;
|
|
8093
|
-
}
|
|
8094
|
-
|
|
8095
8499
|
const TypeErrorCtor = TypeError;
|
|
8096
8500
|
|
|
8097
8501
|
function validateRequiredGlobalShapeAndVirtualizationObjects(globalObjectShape, globalObjectVirtualizationTarget) {
|
|
@@ -8188,22 +8592,16 @@ getCachedBlueReferences(window);
|
|
|
8188
8592
|
*/
|
|
8189
8593
|
|
|
8190
8594
|
function filterWindowDescriptors(endowmentsDescriptors) {
|
|
8191
|
-
const to = {}; //
|
|
8595
|
+
const to = {}; // Endowments descriptors will overrule any default descriptor inferred
|
|
8192
8596
|
// from the detached iframe. note that they are already filtered, not need
|
|
8193
8597
|
// to check against intrinsics again.
|
|
8194
8598
|
|
|
8195
|
-
ObjectAssign$1(to, endowmentsDescriptors); //
|
|
8599
|
+
ObjectAssign$1(to, endowmentsDescriptors); // Removing unforgeable descriptors that cannot be installed
|
|
8196
8600
|
|
|
8197
8601
|
delete to.document;
|
|
8198
8602
|
delete to.location;
|
|
8199
8603
|
delete to.top;
|
|
8200
|
-
delete to.window; //
|
|
8201
|
-
// in this case, if the API is not dangerous, and works in a detached
|
|
8202
|
-
// iframe, we can let the sandbox to use the iframe's api directly,
|
|
8203
|
-
// instead of remapping it to the blue realm.
|
|
8204
|
-
// TODO [issue #67]: review this list
|
|
8205
|
-
|
|
8206
|
-
delete to.crypto; // others browser specific undeniable globals
|
|
8604
|
+
delete to.window; // Other browser specific undeniable globals
|
|
8207
8605
|
|
|
8208
8606
|
delete to.chrome;
|
|
8209
8607
|
return to;
|
|
@@ -8255,7 +8653,6 @@ function linkUnforgeables(env, blueGlobalThis) {
|
|
|
8255
8653
|
}
|
|
8256
8654
|
|
|
8257
8655
|
const IFRAME_SANDBOX_ATTRIBUTE_VALUE = 'allow-same-origin allow-scripts';
|
|
8258
|
-
const emptyArray = [];
|
|
8259
8656
|
const {
|
|
8260
8657
|
close: DocumentProtoClose,
|
|
8261
8658
|
createElement: DocumentProtoCreateElement,
|
|
@@ -8270,42 +8667,26 @@ const {
|
|
|
8270
8667
|
} = Node.prototype;
|
|
8271
8668
|
const {
|
|
8272
8669
|
assign: ObjectAssign
|
|
8273
|
-
} = Object;
|
|
8670
|
+
} = Object; // eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8671
|
+
|
|
8274
8672
|
const {
|
|
8275
|
-
|
|
8276
|
-
__lookupGetter__: ObjectProto__lookupGetter__,
|
|
8277
|
-
hasOwnProperty: ObjectProtoHasOwnProperty
|
|
8673
|
+
__lookupGetter__: ObjectProto__lookupGetter__
|
|
8278
8674
|
} = Object.prototype;
|
|
8279
8675
|
const {
|
|
8280
8676
|
apply: ReflectApply
|
|
8281
8677
|
} = Reflect;
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
// istanbul ignore next
|
|
8288
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
8289
|
-
if (obj === null || obj === undefined || !ReflectApply(ObjectProtoHasOwnProperty, obj, [key])) {
|
|
8290
|
-
return undefined;
|
|
8291
|
-
} // eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
return ReflectApply(ObjectProto__lookupGetter__, obj, [key]);
|
|
8295
|
-
}
|
|
8296
|
-
|
|
8297
|
-
const DocumentProtoBodyGetter = ObjectLookupOwnGetter(Document.prototype, 'body');
|
|
8298
|
-
const HTMLElementProtoStyleGetter = ObjectLookupOwnGetter(HTMLElement.prototype, 'style');
|
|
8299
|
-
const HTMLIFrameElementProtoContentWindowGetter = ObjectLookupOwnGetter(HTMLIFrameElement.prototype, 'contentWindow');
|
|
8300
|
-
const NodeProtoIsConnectedGetter = ObjectLookupOwnGetter(Node.prototype, 'isConnected');
|
|
8301
|
-
const NodeProtoLastChildGetter = ObjectLookupOwnGetter(Node.prototype, 'lastChild');
|
|
8678
|
+
const DocumentProtoBodyGetter = ReflectApply(ObjectProto__lookupGetter__, Document.prototype, ['body']);
|
|
8679
|
+
const HTMLElementProtoStyleGetter = ReflectApply(ObjectProto__lookupGetter__, HTMLElement.prototype, ['style']);
|
|
8680
|
+
const HTMLIFrameElementProtoContentWindowGetter = ReflectApply(ObjectProto__lookupGetter__, HTMLIFrameElement.prototype, ['contentWindow']);
|
|
8681
|
+
const NodeProtoIsConnectedGetter = ReflectApply(ObjectProto__lookupGetter__, Node.prototype, ['isConnected']);
|
|
8682
|
+
const NodeProtoLastChildGetter = ReflectApply(ObjectProto__lookupGetter__, Node.prototype, ['lastChild']);
|
|
8302
8683
|
|
|
8303
8684
|
function DocumentBody(doc) {
|
|
8304
|
-
return ReflectApply(DocumentProtoBodyGetter, doc,
|
|
8685
|
+
return ReflectApply(DocumentProtoBodyGetter, doc, []);
|
|
8305
8686
|
}
|
|
8306
8687
|
|
|
8307
8688
|
function DocumentClose(doc) {
|
|
8308
|
-
return ReflectApply(DocumentProtoClose, doc,
|
|
8689
|
+
return ReflectApply(DocumentProtoClose, doc, []);
|
|
8309
8690
|
}
|
|
8310
8691
|
|
|
8311
8692
|
function DocumentCreateElement(doc, tagName) {
|
|
@@ -8313,7 +8694,7 @@ function DocumentCreateElement(doc, tagName) {
|
|
|
8313
8694
|
}
|
|
8314
8695
|
|
|
8315
8696
|
function DocumentOpen(doc) {
|
|
8316
|
-
return ReflectApply(DocumentProtoOpen, doc,
|
|
8697
|
+
return ReflectApply(DocumentProtoOpen, doc, []);
|
|
8317
8698
|
}
|
|
8318
8699
|
|
|
8319
8700
|
function ElementSetAttribute(el, name, value) {
|
|
@@ -8321,15 +8702,15 @@ function ElementSetAttribute(el, name, value) {
|
|
|
8321
8702
|
}
|
|
8322
8703
|
|
|
8323
8704
|
function ElementRemove(element) {
|
|
8324
|
-
return ReflectApply(ElementProtoRemove, element,
|
|
8705
|
+
return ReflectApply(ElementProtoRemove, element, []);
|
|
8325
8706
|
}
|
|
8326
8707
|
|
|
8327
8708
|
function HTMLElementStyleGetter(el) {
|
|
8328
|
-
return ReflectApply(HTMLElementProtoStyleGetter, el,
|
|
8709
|
+
return ReflectApply(HTMLElementProtoStyleGetter, el, []);
|
|
8329
8710
|
}
|
|
8330
8711
|
|
|
8331
8712
|
function HTMLIFrameElementContentWindowGetter(iframe) {
|
|
8332
|
-
return ReflectApply(HTMLIFrameElementProtoContentWindowGetter, iframe,
|
|
8713
|
+
return ReflectApply(HTMLIFrameElementProtoContentWindowGetter, iframe, []);
|
|
8333
8714
|
}
|
|
8334
8715
|
|
|
8335
8716
|
function NodeAppendChild(parent, child) {
|
|
@@ -8342,11 +8723,11 @@ function NodeAppendChild(parent, child) {
|
|
|
8342
8723
|
|
|
8343
8724
|
|
|
8344
8725
|
function NodeLastChild(node) {
|
|
8345
|
-
return ReflectApply(NodeProtoLastChildGetter, node,
|
|
8726
|
+
return ReflectApply(NodeProtoLastChildGetter, node, []);
|
|
8346
8727
|
}
|
|
8347
8728
|
|
|
8348
8729
|
function NodeIsConnected(node) {
|
|
8349
|
-
return ReflectApply(NodeProtoIsConnectedGetter, node,
|
|
8730
|
+
return ReflectApply(NodeProtoIsConnectedGetter, node, []);
|
|
8350
8731
|
}
|
|
8351
8732
|
|
|
8352
8733
|
function createDetachableIframe$1() {
|
|
@@ -8928,7 +9309,7 @@ function evaluateInSandbox(key, source, context, endowments, instrumentationServ
|
|
|
8928
9309
|
activityEvaluateInSandbox.stop();
|
|
8929
9310
|
return result;
|
|
8930
9311
|
}
|
|
8931
|
-
/*! version: 0.14.
|
|
9312
|
+
/*! version: 0.14.28 */
|
|
8932
9313
|
|
|
8933
9314
|
const loaderDefine = globalThis.LWR.define;
|
|
8934
9315
|
/**
|