* Match elements by the given CSS selector. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
(selector: string)
| 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. |