The child nodes (must not be modified directly!)
The ClassList
of the element (will never change and must not be modified!)
The parent slot element in composed tree (must not be modified directly!)
The shadow-root which owns the element (will never change and must not be modified!)
The index in parentNode.childNodes (-1 if no parentNode) (must not be modified directly!)
The parent element (must not be modified directly!)
The index in containingSlot.slotNodes (must not be modified directly!)
The slot content nodes composed tree (must not be modified directly!)
Static
isStatic
isAdd an event listener on the element
Optional
options: EventListenerOptionsCast a node to an element (native node, virtual node, or component node)
Returns null
if the element is not a text node.
Cast an element to a general component
Returns null
if the element is not a component
Cast an element to the instance of the specified component
Returns null
if the element is not the instance of the specified component.
Cast an element to a native node
Returns null
if the element is not a native node.
Cast an element to a shadow root
Returns null
if the element is not a shadow root.
Cast an element to a virtual node
Returns null
if the element is not a virtual node.
Collect the marks on the element
The marks includes the marks on ancestors (in shadow tree) of the element. If multiple marks on different elements shares the same name, the mark value on the child-most element is accepted.
Create an intersection observer
The relativeElement
is the element to calculate intersection with ( null
for the viewport).
The relativeElementMargin
is the margins of the relativeElement
.
The thresholds
is a list of intersection ratios to trigger the listener
.
The listener always triggers once immediately after this call.
Destroy backend element for the whole subtree.
It will destroy backend elements for the whole subtree (shadow tree) recursively. If a backend element for a component is destroyed, any backend element in the shadow tree of the component will also be destroyed.
Trigger an event with specified event object on the element
Iterate composed child nodes (including virtual nodes)
if f
returns false
then the iteration is interrupted.
Returns true
if that happens.
Iterate non-virtual composed child nodes
if f
returns false
then the iteration is interrupted.
Returns true
if that happens.
Get the backend context
Get the backend element
Get the backend mode
Get composed parent (including virtual nodes)
Get the bounding client rect
Return zero values when the backend element is invalid or it does not have layout information.
Test whether the target in this subtree matches the selector
Select the first descendant which matches the selector
Select all descendants which matches the selector
Remove an event listener on the element
Optional
options: EventListenerOptionsSet the node class
Optional
index: StyleSegmentIndexSet the node style
Optional
index: StyleSegmentIndexToggle the node class
Optional
force: booleanOptional
index: StyleSegmentIndexTrigger an event on the element
Optional
detail: unknownOptional
options: EventOptionsStatic
_$spliceStatic
_$updateStatic
forIterate elements with their slots (slots-inherited nodes included)
Static
forIterate elements in specified slot (slots-inherited nodes included)
Static
forIterate elements with their slots (slots-inherited nodes NOT included)
Static
forIterate elements in specified slot (slots-inherited nodes NOT included)
Static
getGet whether the slot-inherit mode is set or not
Static
getGet the slot name of the element
Static
hasGet whether a node has any subtree MutationObserver
attached to it
If there is, then tree update may have more performance impact.
Static
insertStatic
isCheck the element is attached or not
Static
matchTest whether the target matches the selector
Static
parseParse a selector string so that it can be used multiple queries
Static
pretendMake the element looks like attached.
If the element will never be attached to backend or it has no backend element at all,
this can be used to trigger attached
life-time.
Static
pretendMake the element looks like detached.
This can be used to trigger detached
life-time without remove the element in the backend.
Static
replaceAttach the element into the backend, swapping out a placeholder element in the backend.
The element
must not be a child node of another element,
must not be attached before,
and must not have a ownerShadowRoot
.
The element
targetParent
and targetNode
must be in the same backend context.
The element
replaces the targetNode
in the targetParent
.
Static
setSet the virtual node to slot-inherit mode
In slot-inherit mode of an element, the child nodes of the element will be treated as siblings and can have different target slot.
Static
setSet the binding slot of specific node
Necessary if node belongs to a dynamic slot, which cannot be identified by slot name.
Static
setSet the slot name of the element
Once this method is called for an element
,
it will be treated as a slot which can contain child nodes in composed tree.
This method should not be used in components,
otherwise the slot content will always be dangled.
Optional
name: string
A general element
An element can be a
NativeNode
, aComponent
, or aVirtualNode
.