(element: HTMLElement, classList: string[])
| 303 | * Checks if a given element contains the classes is a provided list |
| 304 | */ |
| 305 | export function elementHasClassList(element: HTMLElement, classList: string[]): boolean { |
| 306 | for (const className of classList) { |
| 307 | if (element.classList.contains(className)) return true; |
| 308 | } |
| 309 | return false; |
| 310 | } |
| 311 | |
| 312 | /** Gets the target of an event while accounting for Shadow DOM. */ |
| 313 | export function getEventTarget<T extends EventTarget>(event: Event): T | null { |
no test coverage detected
searching dependent graphs…