@lesjoursfr/browser-tools
    Preparing search index...

    Function createNodeWith

    • Create a new node.

      Type Parameters

      • K extends keyof HTMLElementTagNameMap

      Parameters

      • tag: K

        the tag name of the node

      • options: {
            attributes?: { [keyof: string]: string };
            innerHTML?: string;
            textContent?: string;
        } = {}

        optional parameters

        • Optionalattributes?: { [keyof: string]: string }

          attributes of the node

        • OptionalinnerHTML?: string

          the HTML code of the node

        • OptionaltextContent?: string

          the text content of the node

      Returns HTMLElementTagNameMap[K]

      the created node