MCPcopy Index your code
hub / github.com/angular/angular / elementHasClassList

Function elementHasClassList

packages/core/src/animation/utils.ts:305–310  ·  view source on GitHub ↗
(element: HTMLElement, classList: string[])

Source from the content-addressed store, hash-verified

303 * Checks if a given element contains the classes is a provided list
304 */
305export 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. */
313export function getEventTarget<T extends EventTarget>(event: Event): T | null {

Callers 1

Calls 1

containsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…