register | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function register

    • Register a component for auto-initialization.

      Type Parameters

      • E extends Element = HTMLElement

      Parameters

      • selector: string

        Selector the component must match

      • handler: RegistrationHandler<E>

        Handler

      • Optionaloptions: { afterdomready: boolean }

        Any unrecognized options are passed to the handler

        The handler will be invoked with two parameters

        • the node to register
        • the index of the node (a unique counter for this selector - first is 0)

      Returns void