Abstract
Component element type
Protected
constructorProtected
Initial element for this component
Insert components in the children list of this ElementComponent
’s parent, just after this ElementComponent
.
Components to insert
Insert component after the last child
Set attribute
attribute name
Optional
value: stringattribute value
Insert components in the children list of this ElementComponent
’s parent, just before this ElementComponent
.
Components to insert
Abstract
cloneClone this component. Event listeners are not cloned.
Optional
deep: booleanWhether to clone the whole subtree.
A duplicate of this component.
Run a function in the context of this component
Provides this component as the first argument and this
.
Empty the component (remove children)
Check if component has class
true if component has all the specified classes
Append HTML.
Any components (provided as ${...}
inside the HTML string literal)
remain fully functional and are appended (not just as HTML).
Add event listener
Add event listener
A case-sensitive string representing the event type to listen for.
The function that is called when an event of the specified type occurs.
An object that specifies characteristics about the event listener. See options
on MDN
Add event listener
Insert component before the first child
Remove the element
Replace classes
If all of these classes are present, they will be removed.
The classes to add if all oldClasses are present
Render this component in the place of a <slot name="…"></slot>
.
The slot name
Optional
parent: ParentNode = documentThe parent element within to search for slots. Defaults to document
DOMException When the slot is not found
Get this component's outer HTML
An Element component