@wopjs/dom - v0.1.3
    Preparing search index...

    Variable createElementConst

    createElement: {
        <K extends keyof HTMLElementTagNameMap>(
            tagName: K,
            options?: ElementCreationOptions,
        ): HTMLElementTagNameMap[K];
        <K extends keyof HTMLElementDeprecatedTagNameMap>(
            tagName: K,
            options?: ElementCreationOptions,
        ): HTMLElementDeprecatedTagNameMap[K];
        (tagName: string, options?: ElementCreationOptions): HTMLElement;
    } = ...

    Creates an instance of the element for the specified tag.

    Type Declaration

      • <K extends keyof HTMLElementTagNameMap>(
            tagName: K,
            options?: ElementCreationOptions,
        ): HTMLElementTagNameMap[K]
      • In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized.

        MDN Reference

        Type Parameters

        • K extends keyof HTMLElementTagNameMap

        Parameters

        • tagName: K
        • Optionaloptions: ElementCreationOptions

        Returns HTMLElementTagNameMap[K]

      • <K extends keyof HTMLElementDeprecatedTagNameMap>(
            tagName: K,
            options?: ElementCreationOptions,
        ): HTMLElementDeprecatedTagNameMap[K]
      • Type Parameters

        • K extends keyof HTMLElementDeprecatedTagNameMap

        Parameters

        • tagName: K
        • Optionaloptions: ElementCreationOptions

        Returns HTMLElementDeprecatedTagNameMap[K]

      • (tagName: string, options?: ElementCreationOptions): HTMLElement
      • Parameters

        • tagName: string
        • Optionaloptions: ElementCreationOptions

        Returns HTMLElement