MCPcopy
hub / github.com/angular/angular / elementMatches

Function elementMatches

packages/platform-browser/src/dom/debug/by.ts:59–69  ·  view source on GitHub ↗
(n: any, selector: string)

Source from the content-addressed store, hash-verified

57}
58
59function elementMatches(n: any, selector: string): boolean {
60 if (getDOM().isElementNode(n)) {
61 return (
62 (n.matches && n.matches(selector)) ||
63 (n.msMatchesSelector && n.msMatchesSelector(selector)) ||
64 (n.webkitMatchesSelector && n.webkitMatchesSelector(selector))
65 );
66 }
67
68 return false;
69}

Callers 1

cssMethod · 0.85

Calls 2

getDOMFunction · 0.85
isElementNodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…