MCPcopy
hub / github.com/angular/angular / matchesSelector

Function matchesSelector

packages/elements/src/utils.ts:60–72  ·  view source on GitHub ↗
(el: any, selector: string)

Source from the content-addressed store, hash-verified

58 * be consolidated in the future
59 */
60export function matchesSelector(el: any, selector: string): boolean {
61 if (!_matches) {
62 const elProto = <any>Element.prototype;
63 _matches =
64 elProto.matches ||
65 elProto.matchesSelector ||
66 elProto.mozMatchesSelector ||
67 elProto.msMatchesSelector ||
68 elProto.oMatchesSelector ||
69 elProto.webkitMatchesSelector;
70 }
71 return el.nodeType === Node.ELEMENT_NODE ? _matches.call(el, selector) : false;
72}
73
74/**
75 * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.

Callers 2

utils_spec.tsFile · 0.90
findMatchingIndexFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…