MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / match

Method match

packages/core/ui/styling/css-selector.ts:567–584  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

565 }
566
567 public match(node: Node): boolean {
568 return this.groups.every((group, i) => {
569 if (i === 0) {
570 node = group.getMatchingNode(node, true);
571
572 return !!node;
573 } else {
574 let ancestor = node;
575 while ((ancestor = ancestor.parent ?? ancestor._modalParent)) {
576 if ((node = group.getMatchingNode(ancestor, true))) {
577 return true;
578 }
579 }
580
581 return false;
582 }
583 });
584 }
585
586 public mayMatch(node: Node): boolean {
587 return false;

Callers 1

accumulateChangesMethod · 0.95

Calls 2

everyMethod · 0.80
getMatchingNodeMethod · 0.80

Tested by

no test coverage detected