NodeV2 class
Representation of a node in the DOM. This class contains everything passed in the HTML text and can be serialized to valid HTML
- Implementers
Constructors
- NodeV2.fromTag(NodeV2 parent, Tag tag)
-
creates a node from a parent and a tag.
factory
- NodeV2.root()
-
constructs an empty node with a null parent
factory
Properties
-
children
→ List<
NodeV2> -
Children nodes.
final
- endHtmlTag → String
-
creates a valid end-tag representation for this node (HTML)
no setter
- endTagName → String
-
final
- fullTag → String
-
full tag specification. A '' tag in HTML would result in
the value of ''
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCustomTag → bool
-
isCustomTag
final
- nodeIndexEnd ↔ int
-
markers on which position in the source-code this node starts/ends
getter/setter pair
- nodeIndexStart ↔ int
-
markers on which position in the source-code this node starts/ends
getter/setter pair
- parent → NodeV2?
-
Parent node. All nodes in the DOM except the root node will have a parent
final
- prettyTag → String
-
returns a prettier version of the tag (no HTML)
no setter
-
properties
→ List<
SimpleProperty> -
text-properties of the tag
final
- root → NodeV2
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startHtmlTag → String
-
creates a valid start-tag representation for this node (HTML)
no setter
- startTagName → String
-
tag-type. A '' tag in HTML would result in the value of "a"
final
- styleProperty → StyleProperty?
-
returns the cached style (if present), searches for it in the properties
otherwise
no setter
- textIndexEnd → int
-
no setter
- textIndexStart ↔ int
-
getter/setter pair
Methods
-
addChild(
NodeV2 node, [int? position]) → void - adds a child-node to this node at an optional position. Triggers a recalc of node indices
-
getLeaves(
) → List< SimpleNode> -
getNodesInSelection(
int start, int end) → List< SimpleNode> -
find all nodes that have their textIndexStart >=
start
andstartIndex+body.length
<=end
-
isFullySelected(
int selectionStart, int selectionEnd) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toHtml(
) → String - serializes the tree back to a HTML string
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited