MCPcopy
hub / github.com/angular/angular / css

Method css

packages/platform-browser/src/dom/debug/by.ts:38–44  ·  view source on GitHub ↗

* Match elements by the given CSS selector. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}

(selector: string)

Source from the content-addressed store, hash-verified

36 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
37 */
38 static css(selector: string): Predicate<DebugElement> {
39 return (debugElement) => {
40 return debugElement.nativeElement != null
41 ? elementMatches(debugElement.nativeElement, selector)
42 : false;
43 };
44 }
45
46 /**
47 * Match nodes that have the given directive present.

Callers 15

styleCountFunction · 0.80
validateHtmlFunction · 0.80
expectHtmlFunction · 0.80
test_bed_spec.tsFile · 0.80
verifyImagesPresentFunction · 0.80
basic.e2e-spec.tsFile · 0.80
debug_node_spec.tsFile · 0.80
animation_spec.tsFile · 0.80

Calls 1

elementMatchesFunction · 0.85

Tested by 6

beforeEachFunction · 0.64
getDebugElementsFunction · 0.64
getCdLabelFunction · 0.64
getMatchesCountElFunction · 0.64
initTestComponentFunction · 0.64