Optional
element: SVGSVGElementInsert 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
Clone this component. Event listeners are not cloned.
Whether 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)
Get element property
property name
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
Replace classes
If all of these classes are present, they will be removed.
The classes to add if all oldClasses are present
Set element property
property name
property value
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
Static
from
An SVG component (
<svg>
)