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