kit
    Preparing search index...

    Function dom

    • Sizzle/jQuery like DOM nodes shortcut for document.querySelector To avoid an extra function call we inline the above escape

      Type Parameters

      • T extends Element = HTMLElement

      Parameters

      • selector: string

        DOM selector

      • Optionalparent: HTMLElement | Element | Document | null

        It falls back to window.document

      • OptionalavoidEscape: boolean

        Whether to avoid escaping : in the selector string

      Returns T

      const $container = dom(".my-section:");
      const $el = dom("[data-some-attr]", $container);