(element: HTMLElement, classList: string[])
| 330 | * Checks if a given element contains the classes is a provided list |
| 331 | */ |
| 332 | export function elementHasClassList(element: HTMLElement, classList: string[]): boolean { |
| 333 | for (const className of classList) { |
| 334 | if (element.classList.contains(className)) return true; |
| 335 | } |
| 336 | return false; |
| 337 | } |
| 338 | |
| 339 | /** Gets the target of an event while accounting for Shadow DOM. */ |
| 340 | export function getEventTarget<T extends EventTarget>(event: Event): T | null { |
no test coverage detected