Functions
childSelector
- childSelector(rootEl: HTMLElement, selector: string): null | HTMLElement
Parameters
rootEl: HTMLElement
selector: string
Returns null | HTMLElement
childSelectorAll
- childSelectorAll(rootEl: HTMLElement, selector: string): HTMLElement[]
Parameters
rootEl: HTMLElement
selector: string
Returns HTMLElement[]
findAllChildren
- findAllChildren(rootEl: HTMLElement, predicate: ((el: HTMLElement) => boolean)): HTMLElement[]
Parameters
rootEl: HTMLElement
predicate: ((el: HTMLElement) => boolean)
- (el: HTMLElement): boolean
Parameters
Returns boolean
Returns HTMLElement[]
findChild
- findChild(rootEl: HTMLElement, predicate: ((el: HTMLElement) => boolean)): null | HTMLElement
Parameters
rootEl: HTMLElement
predicate: ((el: HTMLElement) => boolean)
- (el: HTMLElement): boolean
Parameters
Returns boolean
Returns null | HTMLElement
forEachChild
- forEachChild(rootEl: HTMLElement, action: ((el: HTMLElement) => void)): void
Parameters
rootEl: HTMLElement
action: ((el: HTMLElement) => void)
Returns void
Get the first child that matches the given selector