( selector: string, )
| 85 | * @returns An ElementWithUtils wrapping the found element, null if not found. |
| 86 | */ |
| 87 | export function qs<T extends HTMLElement = HTMLElement>( |
| 88 | selector: string, |
| 89 | ): ElementWithUtils<T> | null { |
| 90 | checkUniqueSelector(selector); |
| 91 | const el = document.querySelector<T>(selector); |
| 92 | return el ? new ElementWithUtils(el) : null; |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Query Selector All |
no test coverage detected