Function querySelectors

  • Selects the first elements corresponding to each of the selector args. This calls qcontainingElement.uerySelector on each of the selectors, so that only first elements are selected. It is different from querySelectorAll which will select all elements.

    The containing element defaults to document.body.

    Parameters

    • selectors: string | string[]
    • Optional containingElement: Element

    Returns Element[]

    Example

    import { select } from 'deleight/appliance'
    const [firstDiv, firstP, firstSpan] = select('div, p, span');