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
Get a !DOMRect object providing information about the size of a component and its position relative to the viewport.
Add classes
Clone 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
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
Insert component before the first child
Remove the element
Remove attribute
attribute name
Remove classes
Replace classes
If all of these classes are present, they will be removed.
The classes to add if all oldClasses are present
Set text content
Toggle classes
Get this component's outer HTML
Static
fromCreate SVG component from <svg>...</svg>
code