(selector: string)
| 224 | } |
| 225 | |
| 226 | function getElement<T extends Element = Element>(selector: string): T { |
| 227 | const el = document.querySelector<T>(selector) |
| 228 | if (!el) { |
| 229 | throw new Error(`Unable to find element: ${selector}`) |
| 230 | } |
| 231 | return el |
| 232 | } |
| 233 | |
| 234 | function createElementHandle<T extends Element>(node: T): ElementHandle<T> { |
| 235 | return { |
no test coverage detected