Documentation
    Preparing search index...

    Function extractElementOptions

    • Extracts data attributes from a given element out of a sample whitelist.

      Type Parameters

      • T extends Record<string, string | number | boolean>

      Parameters

      • el: HTMLElement

        The element to gather attributes from

      • baseOptions: T

        The whitelist of accepted data attributes and their relative types

      Returns T

      An object of the available attributes and their values