@laserware/dominator
    Preparing search index...

    Type Alias CreateElementOptions<TN>

    CreateElementOptions: Partial<ElementPropertiesOf<TN>> & {
        attributes?: Attributes<ElementOf<TN>> | Record<string, any>;
        cssVars?: CssVars;
        dataset?: Dataset | Record<string, any>;
        namespace?: Namespace;
        on?: EventListenersOrDescriptorsFor<TN>;
        styles?: Styles;
    }

    Options for creating an element using createElement.

    Type Parameters

    • TN extends TagName | string

      Tag name for the created element.

    Type declaration

    • Optionalattributes?: Attributes<ElementOf<TN>> | Record<string, any>

      Attributes to set on element.

    • OptionalcssVars?: CssVars

      CSS variables to set on element.

    • Optionaldataset?: Dataset | Record<string, any>

      Dataset entries to set on element.

    • Optionalnamespace?: Namespace

      Namespace to use when creating the element. This is required for elements that need to be created with document.createElementNS() (namely, SVG and MathML elements).

    • Optionalon?: EventListenersOrDescriptorsFor<TN>

      Event listeners or EventDescriptorFor objects to set on element.

      The EventDescriptor is an object with a listener field that defines the callback that is fired when the corresponding event is dispatched and an options object matching the options argument in addEventListener. See the MDN documentation for additional details.

    • Optionalstyles?: Styles

      Styles to set on element.