lwc 2.23.5 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine-dom/esm/es2017/engine-dom.js +216 -69
- package/dist/engine-dom/iife/es2017/engine-dom.js +216 -69
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +194 -67
- package/dist/engine-dom/iife/es5/engine-dom.js +494 -313
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +463 -299
- package/dist/engine-dom/umd/es2017/engine-dom.js +216 -69
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +194 -67
- package/dist/engine-dom/umd/es5/engine-dom.js +494 -313
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +463 -299
- package/dist/engine-server/commonjs/es2017/engine-server.js +124 -16
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +124 -16
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +205 -168
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +205 -168
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +195 -158
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +25 -11
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +25 -11
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +205 -168
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +195 -158
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +25 -11
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +25 -11
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +2 -2
- package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +2 -2
- package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
- package/package.json +7 -7
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
const KEY__SHADOW_TOKEN = '$shadowToken$';
|
|
90
90
|
const KEY__SHADOW_TOKEN_PRIVATE = '$$ShadowTokenKey$$';
|
|
91
91
|
const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
92
|
-
/** version: 2.
|
|
92
|
+
/** version: 2.24.0 */
|
|
93
93
|
|
|
94
94
|
/*
|
|
95
95
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
404
404
|
}
|
|
405
405
|
const lwcRuntimeFlags = _globalThis.lwcRuntimeFlags;
|
|
406
|
-
/** version: 2.
|
|
406
|
+
/** version: 2.24.0 */
|
|
407
407
|
|
|
408
408
|
/*
|
|
409
409
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -481,191 +481,228 @@
|
|
|
481
481
|
* SPDX-License-Identifier: MIT
|
|
482
482
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
483
483
|
*/
|
|
484
|
-
// when finding a slot in the DOM, we can fold it if it is contained
|
|
485
484
|
// inside another slot.
|
|
485
|
+
|
|
486
486
|
function foldSlotElement(slot) {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
487
|
+
let parent = parentElementGetter.call(slot);
|
|
488
|
+
|
|
489
|
+
while (!isNull(parent) && isSlotElement(parent)) {
|
|
490
|
+
slot = parent;
|
|
491
|
+
parent = parentElementGetter.call(slot);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
return slot;
|
|
493
495
|
}
|
|
496
|
+
|
|
494
497
|
function isNodeSlotted(host, node) {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
}
|
|
542
|
-
else {
|
|
543
|
-
return false;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
else {
|
|
547
|
-
currentElement = parent;
|
|
498
|
+
|
|
499
|
+
const hostKey = getNodeKey(host); // this routine assumes that the node is coming from a different shadow (it is not owned by the host)
|
|
500
|
+
// just in case the provided node is not an element
|
|
501
|
+
|
|
502
|
+
let currentElement = node instanceof Element ? node : parentElementGetter.call(node);
|
|
503
|
+
|
|
504
|
+
while (!isNull(currentElement) && currentElement !== host) {
|
|
505
|
+
const elmOwnerKey = getNodeNearestOwnerKey(currentElement);
|
|
506
|
+
const parent = parentElementGetter.call(currentElement);
|
|
507
|
+
|
|
508
|
+
if (elmOwnerKey === hostKey) {
|
|
509
|
+
// we have reached an element inside the host's template, and only if
|
|
510
|
+
// that element is an slot, then the node is considered slotted
|
|
511
|
+
return isSlotElement(currentElement);
|
|
512
|
+
} else if (parent === host) {
|
|
513
|
+
return false;
|
|
514
|
+
} else if (!isNull(parent) && getNodeNearestOwnerKey(parent) !== elmOwnerKey) {
|
|
515
|
+
// we are crossing a boundary of some sort since the elm and its parent
|
|
516
|
+
// have different owner key. for slotted elements, this is possible
|
|
517
|
+
// if the parent happens to be a slot.
|
|
518
|
+
if (isSlotElement(parent)) {
|
|
519
|
+
/**
|
|
520
|
+
* the slot parent might be allocated inside another slot, think of:
|
|
521
|
+
* <x-root> (<--- root element)
|
|
522
|
+
* <x-parent> (<--- own by x-root)
|
|
523
|
+
* <x-child> (<--- own by x-root)
|
|
524
|
+
* <slot> (<--- own by x-child)
|
|
525
|
+
* <slot> (<--- own by x-parent)
|
|
526
|
+
* <div> (<--- own by x-root)
|
|
527
|
+
*
|
|
528
|
+
* while checking if x-parent has the div slotted, we need to traverse
|
|
529
|
+
* up, but when finding the first slot, we skip that one in favor of the
|
|
530
|
+
* most outer slot parent before jumping into its corresponding host.
|
|
531
|
+
*/
|
|
532
|
+
currentElement = getNodeOwner(foldSlotElement(parent));
|
|
533
|
+
|
|
534
|
+
if (!isNull(currentElement)) {
|
|
535
|
+
if (currentElement === host) {
|
|
536
|
+
// the slot element is a top level element inside the shadow
|
|
537
|
+
// of a host that was allocated into host in question
|
|
538
|
+
return true;
|
|
539
|
+
} else if (getNodeNearestOwnerKey(currentElement) === hostKey) {
|
|
540
|
+
// the slot element is an element inside the shadow
|
|
541
|
+
// of a host that was allocated into host in question
|
|
542
|
+
return true;
|
|
543
|
+
}
|
|
548
544
|
}
|
|
545
|
+
} else {
|
|
546
|
+
return false;
|
|
547
|
+
}
|
|
548
|
+
} else {
|
|
549
|
+
currentElement = parent;
|
|
549
550
|
}
|
|
550
|
-
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
return false;
|
|
551
554
|
}
|
|
555
|
+
|
|
552
556
|
function getNodeOwner(node) {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
557
|
+
if (!(node instanceof _Node)) {
|
|
558
|
+
return null;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
const ownerKey = getNodeNearestOwnerKey(node);
|
|
562
|
+
|
|
563
|
+
if (isUndefined(ownerKey)) {
|
|
564
|
+
return null;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
let nodeOwner = node; // At this point, node is a valid node with owner identity, now we need to find the owner node
|
|
568
|
+
// search for a custom element with a VM that owns the first element with owner identity attached to it
|
|
569
|
+
|
|
570
|
+
while (!isNull(nodeOwner) && getNodeKey(nodeOwner) !== ownerKey) {
|
|
571
|
+
nodeOwner = parentNodeGetter.call(nodeOwner);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
if (isNull(nodeOwner)) {
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
return nodeOwner;
|
|
570
579
|
}
|
|
571
580
|
function isSyntheticSlotElement(node) {
|
|
572
|
-
|
|
581
|
+
return isSlotElement(node) && isNodeShadowed(node);
|
|
573
582
|
}
|
|
574
583
|
function isSlotElement(node) {
|
|
575
|
-
|
|
584
|
+
return node instanceof HTMLSlotElement;
|
|
576
585
|
}
|
|
577
586
|
function isNodeOwnedBy(owner, node) {
|
|
578
|
-
|
|
579
|
-
|
|
587
|
+
|
|
588
|
+
const ownerKey = getNodeNearestOwnerKey(node);
|
|
589
|
+
|
|
590
|
+
if (isUndefined(ownerKey)) {
|
|
591
|
+
if (lwcRuntimeFlags.ENABLE_LIGHT_GET_ROOT_NODE_PATCH) {
|
|
592
|
+
// in case of root level light DOM element slotting into a synthetic shadow
|
|
593
|
+
const host = parentNodeGetter.call(node);
|
|
594
|
+
|
|
595
|
+
if (!isNull(host) && isSyntheticSlotElement(host)) {
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
} // in case of manually inserted elements
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
return true;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
return getNodeKey(owner) === ownerKey;
|
|
580
605
|
}
|
|
581
606
|
function shadowRootChildNodes(root) {
|
|
582
|
-
|
|
583
|
-
|
|
607
|
+
const elm = getHost(root);
|
|
608
|
+
return getAllMatches(elm, arrayFromCollection(childNodesGetter.call(elm)));
|
|
584
609
|
}
|
|
585
610
|
function getAllSlottedMatches(host, nodeList) {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
611
|
+
const filteredAndPatched = [];
|
|
612
|
+
|
|
613
|
+
for (let i = 0, len = nodeList.length; i < len; i += 1) {
|
|
614
|
+
const node = nodeList[i];
|
|
615
|
+
|
|
616
|
+
if (!isNodeOwnedBy(host, node) && isNodeSlotted(host, node)) {
|
|
617
|
+
ArrayPush.call(filteredAndPatched, node);
|
|
592
618
|
}
|
|
593
|
-
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
return filteredAndPatched;
|
|
594
622
|
}
|
|
595
623
|
function getFirstSlottedMatch(host, nodeList) {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
624
|
+
for (let i = 0, len = nodeList.length; i < len; i += 1) {
|
|
625
|
+
const node = nodeList[i];
|
|
626
|
+
|
|
627
|
+
if (!isNodeOwnedBy(host, node) && isNodeSlotted(host, node)) {
|
|
628
|
+
return node;
|
|
601
629
|
}
|
|
602
|
-
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
return null;
|
|
603
633
|
}
|
|
604
634
|
function getAllMatches(owner, nodeList) {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
635
|
+
const filteredAndPatched = [];
|
|
636
|
+
|
|
637
|
+
for (let i = 0, len = nodeList.length; i < len; i += 1) {
|
|
638
|
+
const node = nodeList[i];
|
|
639
|
+
const isOwned = isNodeOwnedBy(owner, node);
|
|
640
|
+
|
|
641
|
+
if (isOwned) {
|
|
642
|
+
// Patch querySelector, querySelectorAll, etc
|
|
643
|
+
// if element is owned by VM
|
|
644
|
+
ArrayPush.call(filteredAndPatched, node);
|
|
614
645
|
}
|
|
615
|
-
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
return filteredAndPatched;
|
|
616
649
|
}
|
|
617
650
|
function getFirstMatch(owner, nodeList) {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
651
|
+
for (let i = 0, len = nodeList.length; i < len; i += 1) {
|
|
652
|
+
if (isNodeOwnedBy(owner, nodeList[i])) {
|
|
653
|
+
return nodeList[i];
|
|
622
654
|
}
|
|
623
|
-
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
return null;
|
|
624
658
|
}
|
|
625
659
|
function shadowRootQuerySelector(root, selector) {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
660
|
+
const elm = getHost(root);
|
|
661
|
+
const nodeList = arrayFromCollection(querySelectorAll$1.call(elm, selector));
|
|
662
|
+
return getFirstMatch(elm, nodeList);
|
|
629
663
|
}
|
|
630
664
|
function shadowRootQuerySelectorAll(root, selector) {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
665
|
+
const elm = getHost(root);
|
|
666
|
+
const nodeList = querySelectorAll$1.call(elm, selector);
|
|
667
|
+
return getAllMatches(elm, arrayFromCollection(nodeList));
|
|
634
668
|
}
|
|
635
669
|
function getFilteredChildNodes(node) {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
670
|
+
if (!isSyntheticShadowHost(node) && !isSlotElement(node)) {
|
|
671
|
+
// regular element - fast path
|
|
672
|
+
const children = childNodesGetter.call(node);
|
|
673
|
+
return arrayFromCollection(children);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
if (isSyntheticShadowHost(node)) {
|
|
677
|
+
// we need to get only the nodes that were slotted
|
|
678
|
+
const slots = arrayFromCollection(querySelectorAll$1.call(node, 'slot'));
|
|
679
|
+
const resolver = getShadowRootResolver(getShadowRoot(node)); // Typescript is inferring the wrong function type for this particular
|
|
680
|
+
// overloaded method: https://github.com/Microsoft/TypeScript/issues/27972
|
|
681
|
+
// @ts-ignore type-mismatch
|
|
682
|
+
|
|
683
|
+
return ArrayReduce.call(slots, (seed, slot) => {
|
|
684
|
+
if (resolver === getShadowRootResolver(slot)) {
|
|
685
|
+
ArrayPush.apply(seed, getFilteredSlotAssignedNodes(slot));
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
return seed;
|
|
689
|
+
}, []);
|
|
690
|
+
} else {
|
|
691
|
+
// slot element
|
|
692
|
+
const children = arrayFromCollection(childNodesGetter.call(node));
|
|
693
|
+
const resolver = getShadowRootResolver(node);
|
|
694
|
+
return ArrayFilter.call(children, child => resolver === getShadowRootResolver(child));
|
|
695
|
+
}
|
|
661
696
|
}
|
|
662
697
|
function getFilteredSlotAssignedNodes(slot) {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
698
|
+
const owner = getNodeOwner(slot);
|
|
699
|
+
|
|
700
|
+
if (isNull(owner)) {
|
|
701
|
+
return [];
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
const childNodes = arrayFromCollection(childNodesGetter.call(slot));
|
|
705
|
+
return ArrayFilter.call(childNodes, child => !isNodeShadowed(child) || !isNodeOwnedBy(owner, child));
|
|
669
706
|
}
|
|
670
707
|
|
|
671
708
|
/*
|
|
@@ -3799,11 +3836,11 @@
|
|
|
3799
3836
|
// element with shadowRoot attached
|
|
3800
3837
|
const owner = getNodeOwner(this);
|
|
3801
3838
|
|
|
3802
|
-
if (
|
|
3803
|
-
return null;
|
|
3804
|
-
} else if (getNodeKey(this)) {
|
|
3839
|
+
if (!isUndefined(getNodeKey(this))) {
|
|
3805
3840
|
// it is a custom element, and we should then filter by slotted elements
|
|
3806
3841
|
return getFirstSlottedMatch(this, nodeList);
|
|
3842
|
+
} else if (isNull(owner)) {
|
|
3843
|
+
return null;
|
|
3807
3844
|
} else {
|
|
3808
3845
|
// regular element, we should then filter by ownership
|
|
3809
3846
|
return getFirstMatch(owner, nodeList);
|
|
@@ -3850,11 +3887,11 @@
|
|
|
3850
3887
|
// element with shadowRoot attached
|
|
3851
3888
|
const owner = getNodeOwner(context);
|
|
3852
3889
|
|
|
3853
|
-
if (
|
|
3854
|
-
filtered = [];
|
|
3855
|
-
} else if (getNodeKey(context)) {
|
|
3890
|
+
if (!isUndefined(getNodeKey(context))) {
|
|
3856
3891
|
// it is a custom element, and we should then filter by slotted elements
|
|
3857
3892
|
filtered = getAllSlottedMatches(context, unfilteredNodes);
|
|
3893
|
+
} else if (isNull(owner)) {
|
|
3894
|
+
filtered = [];
|
|
3858
3895
|
} else {
|
|
3859
3896
|
// regular element, we should then filter by ownership
|
|
3860
3897
|
filtered = getAllMatches(owner, unfilteredNodes);
|
|
@@ -4936,6 +4973,6 @@
|
|
|
4936
4973
|
},
|
|
4937
4974
|
configurable: true,
|
|
4938
4975
|
});
|
|
4939
|
-
/** version: 2.
|
|
4976
|
+
/** version: 2.24.0 */
|
|
4940
4977
|
|
|
4941
4978
|
}));
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
var hasNativeSymbolSupport = /*@__PURE__*/function () {
|
|
202
202
|
return Symbol('x').toString() === 'Symbol(x)';
|
|
203
203
|
}();
|
|
204
|
-
/** version: 2.
|
|
204
|
+
/** version: 2.24.0 */
|
|
205
205
|
|
|
206
206
|
/*
|
|
207
207
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
var lwcRuntimeFlags = _globalThis.lwcRuntimeFlags;
|
|
553
|
-
/** version: 2.
|
|
553
|
+
/** version: 2.24.0 */
|
|
554
554
|
|
|
555
555
|
/*
|
|
556
556
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -633,7 +633,6 @@
|
|
|
633
633
|
* SPDX-License-Identifier: MIT
|
|
634
634
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
635
635
|
*/
|
|
636
|
-
// when finding a slot in the DOM, we can fold it if it is contained
|
|
637
636
|
// inside another slot.
|
|
638
637
|
|
|
639
638
|
|
|
@@ -753,7 +752,22 @@
|
|
|
753
752
|
}
|
|
754
753
|
|
|
755
754
|
var ownerKey = getNodeNearestOwnerKey(node);
|
|
756
|
-
|
|
755
|
+
|
|
756
|
+
if (isUndefined(ownerKey)) {
|
|
757
|
+
if (lwcRuntimeFlags.ENABLE_LIGHT_GET_ROOT_NODE_PATCH) {
|
|
758
|
+
// in case of root level light DOM element slotting into a synthetic shadow
|
|
759
|
+
var host = parentNodeGetter.call(node);
|
|
760
|
+
|
|
761
|
+
if (!isNull(host) && isSyntheticSlotElement(host)) {
|
|
762
|
+
return false;
|
|
763
|
+
}
|
|
764
|
+
} // in case of manually inserted elements
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
return true;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
return getNodeKey(owner) === ownerKey;
|
|
757
771
|
}
|
|
758
772
|
|
|
759
773
|
function shadowRootChildNodes(root) {
|
|
@@ -4362,11 +4376,11 @@
|
|
|
4362
4376
|
// element with shadowRoot attached
|
|
4363
4377
|
var owner = getNodeOwner(this);
|
|
4364
4378
|
|
|
4365
|
-
if (
|
|
4366
|
-
return null;
|
|
4367
|
-
} else if (getNodeKey(this)) {
|
|
4379
|
+
if (!isUndefined(getNodeKey(this))) {
|
|
4368
4380
|
// it is a custom element, and we should then filter by slotted elements
|
|
4369
4381
|
return getFirstSlottedMatch(this, nodeList);
|
|
4382
|
+
} else if (isNull(owner)) {
|
|
4383
|
+
return null;
|
|
4370
4384
|
} else {
|
|
4371
4385
|
// regular element, we should then filter by ownership
|
|
4372
4386
|
return getFirstMatch(owner, nodeList);
|
|
@@ -4422,11 +4436,11 @@
|
|
|
4422
4436
|
// element with shadowRoot attached
|
|
4423
4437
|
var owner = getNodeOwner(context);
|
|
4424
4438
|
|
|
4425
|
-
if (
|
|
4426
|
-
filtered = [];
|
|
4427
|
-
} else if (getNodeKey(context)) {
|
|
4439
|
+
if (!isUndefined(getNodeKey(context))) {
|
|
4428
4440
|
// it is a custom element, and we should then filter by slotted elements
|
|
4429
4441
|
filtered = getAllSlottedMatches(context, unfilteredNodes);
|
|
4442
|
+
} else if (isNull(owner)) {
|
|
4443
|
+
filtered = [];
|
|
4430
4444
|
} else {
|
|
4431
4445
|
// regular element, we should then filter by ownership
|
|
4432
4446
|
filtered = getAllMatches(owner, unfilteredNodes);
|
|
@@ -5670,6 +5684,6 @@
|
|
|
5670
5684
|
}));
|
|
5671
5685
|
});
|
|
5672
5686
|
}
|
|
5673
|
-
/** version: 2.
|
|
5687
|
+
/** version: 2.24.0 */
|
|
5674
5688
|
|
|
5675
5689
|
}));
|