TNodeDescriptor
@native-html/transient-render-engine
A minimal TNode shape accessible at instantiation.
#
Fieldsattributes
#
attributes
:
Record
<
string
,
string
>
;
Attributes for this tag.
classes
#
classes
:
Array
<
string
>
;
A list of classes for this node, extracted from the class attribute of the
underlying ​Node
.
domNode
#
A reference to the underlying DOM node.
id
#
id
:
null
|
string
;
The id for this node, extracted from the id attribute of the
underlying ​Node
.
markers
#
Markers form an abstraction in which one node provides semantic information
to itself and all its descendants. For example, ins
elements, which stand
for "insertion" of content in the context of an edit will provide the {
edits: 'ins' } marker to all its descendants.
Remarks
This attribute must be considered immutable. Never try to change it by hand, or you might update the markers of an anscestor! For performance reasons, markers instances might be shared from parent to children when they are equal.
tagName
#
tagName
:
null
|
string
;
The tag name for this node.
Remarks
Anonymous nodes generated during hoisting won't have a tag name. Also, some TText nodes don't have a tagName.
#
MethodshasClass
#
hasClass
:
(
className
:
string
)
=>
boolean
;
Check if this ​TNode
has the given className
.
#
ParametersclassName
The class to check.