• Returns a component that applies all the specified components to the matched element(s):

    Parameters

    Returns ((elements, matcher?, ...args) => void)

      • (elements, matcher?, ...args): void
      • Parameters

        • elements: Element | Iterable<Element>
        • Optional matcher: Attr | IKey
        • Rest ...args: any[]

        Returns void

    Example

    import { listener } from 'deleight/dom/components'
    import { apply } from 'deleight/dom/apply'

    document.body.innerHTML = `
    <div>I am a div</div>
    <p>I am a paragraph</p>
    <section>I am a section <button>Btn1</button></section>
    <article>I am an article <button>Btn2</button></article>
    `;

    const a = setter('a');
    const b = setter('b');
    apply({ section: { button: all(a(2), b(3)) }, article: { button: all(a(62), b(53)) } });