Node class

The DOM interface is an abstract base class upon which many other DOM API objects are based, thus letting those object types to be used similarly and often interchangeably. As an abstract class, there is no such thing as a plain object. All objects that implement functionality are based on one of its subclasses. Most notable are Document, Element, and DocumentFragment. In addition, every kind of DOM node is represented by an interface based on . These include Attr, CharacterData (which Text, Comment, CDATASection and ProcessingInstruction are all based on), and DocumentType. In some cases, a particular feature of the base interface may not apply to one of its child interfaces; in that case, the inheriting node may return null or throw an exception, depending on circumstances. For example, attempting to add children to a node type that cannot have children will throw an exception.

EventTarget

Node

Implemented types
Implementers
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Node()
factory

Properties

baseURI String

Available on Node, provided by the PropsNode extension

no setter
childNodes NodeList

Available on Node, provided by the PropsNode extension

no setter
firstChild Node?

Available on Node, provided by the PropsNode extension

no setter
hashCode int
The hash code for this object.
no setterinherited
isConnected bool

Available on Node, provided by the PropsNode extension

no setter
lastChild Node?

Available on Node, provided by the PropsNode extension

no setter
nextSibling Node?

Available on Node, provided by the PropsNode extension

no setter
nodeName String

Available on Node, provided by the PropsNode extension

no setter
nodeType int

Available on Node, provided by the PropsNode extension

no setter
nodeValue String?

Available on Node, provided by the PropsNode extension

getter/setter pair
ownerDocument Document?

Available on Node, provided by the PropsNode extension

no setter
parentElement Element?

Available on Node, provided by the PropsNode extension

no setter
parentNode Node?

Available on Node, provided by the PropsNode extension

no setter
previousSibling Node?

Available on Node, provided by the PropsNode extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textContent String?

Available on Node, provided by the PropsNode extension

getter/setter pair

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

appendChild(Node node) Node

Available on Node, provided by the PropsNode extension

cloneNode([bool? deep = false]) Node

Available on Node, provided by the PropsNode extension

compareDocumentPosition(Node other) int

Available on Node, provided by the PropsNode extension

contains(Node? other) bool

Available on Node, provided by the PropsNode extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

getRootNode([GetRootNodeOptions? options]) Node

Available on Node, provided by the PropsNode extension

hasChildNodes() bool

Available on Node, provided by the PropsNode extension

insertBefore(Node node, Node? child) Node

Available on Node, provided by the PropsNode extension

isDefaultNamespace(String? namespace) bool

Available on Node, provided by the PropsNode extension

isEqualNode(Node? otherNode) bool

Available on Node, provided by the PropsNode extension

isSameNode(Node? otherNode) bool

Available on Node, provided by the PropsNode extension

lookupNamespaceURI(String? prefix) String?

Available on Node, provided by the PropsNode extension

lookupPrefix(String? namespace) String?

Available on Node, provided by the PropsNode extension

normalize() → void

Available on Node, provided by the PropsNode extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeChild(Node child) Node

Available on Node, provided by the PropsNode extension

removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

replaceChild(Node node, Node child) Node

Available on Node, provided by the PropsNode extension

toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

attributeNode int
no setter
cdataSectionNode int
no setter
commentNode int
no setter
documentFragmentNode int
no setter
documentNode int
no setter
documentPositionContainedBy int
no setter
documentPositionContains int
no setter
documentPositionDisconnected int
no setter
documentPositionFollowing int
no setter
documentPositionImplementationSpecific int
no setter
documentPositionPreceding int
no setter
documentTypeNode int
no setter
elementNode int
no setter
entityNode int
no setter
entityReferenceNode int
no setter
notationNode int
no setter
processingInstructionNode int
no setter
textNode int
no setter