Tag name for the created element.
Optional
attributes?: Attributes<ElementOf<TN>> | Record<string, any>Attributes to set on element.
Optional
cssVars?: CssVarsCSS variables to set on element.
Optional
dataset?: Dataset | Record<string, any>Dataset entries to set on element.
Optional
namespace?: NamespaceNamespace to use when creating the element. This is required for elements
that need to be created with document.createElementNS()
(namely, SVG and MathML elements).
Optional
on?: 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.
Optional
styles?: StylesStyles to set on element.
Options for creating an element using
createElement
.