Function createAll

  • Create all instances of a specific component on the page

    Uses the data-module attribute to find all elements matching the specified component on the page, creating instances of the component object for each of them.

    Any component errors will be caught and logged to the console.

    Type Parameters

    Parameters

    Returns InstanceType<ComponentClass>[]

    • array of instantiated components