Node class

Node is an interface from which a number of DOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way.

MDN Reference

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

Constructors

Node()
factory

Properties

addEventListener ↔ void Function(String, [Object?, Object?])

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
appendChild ↔ T Function<T extends Node>(T)

Available on Node, provided by the Node$Typings extension

getter/setter pair
attributeNode → num

Available on Node, provided by the Node$Typings extension

no setter
baseURI → String

Available on Node, provided by the Node$Typings extension

Returns node's node document's document base URL.
no setter
cdataSectionNode → num

Available on Node, provided by the Node$Typings extension

node is a CDATASection node.
no setter
childNodes → NodeListOf<ChildNode>

Available on Node, provided by the Node$Typings extension

Returns the children.
no setter
cloneNode ↔ Node Function([bool?])

Available on Node, provided by the Node$Typings extension

getter/setter pair
commentNode → num

Available on Node, provided by the Node$Typings extension

node is a Comment node.
no setter
compareDocumentPosition ↔ num Function(Node)

Available on Node, provided by the Node$Typings extension

getter/setter pair
contains ↔ bool Function([Node?])

Available on Node, provided by the Node$Typings extension

getter/setter pair
dispatchEvent ↔ bool Function(Event event)

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
documentFragmentNode → num

Available on Node, provided by the Node$Typings extension

node is a DocumentFragment node.
no setter
documentNode → num

Available on Node, provided by the Node$Typings extension

node is a document.
no setter
documentPositionContainedBy → num

Available on Node, provided by the Node$Typings extension

Set when other is a descendant of node.
no setter
documentPositionContains → num

Available on Node, provided by the Node$Typings extension

Set when other is an ancestor of node.
no setter
documentPositionDisconnected → num

Available on Node, provided by the Node$Typings extension

Set when node and other are not in the same tree.
no setter
documentPositionFollowing → num

Available on Node, provided by the Node$Typings extension

Set when other is following node.
no setter
documentPositionImplementationSpecific → num

Available on Node, provided by the Node$Typings extension

no setter
documentPositionPreceding → num

Available on Node, provided by the Node$Typings extension

Set when other is preceding node.
no setter
documentTypeNode → num

Available on Node, provided by the Node$Typings extension

node is a doctype.
no setter
elementNode → num

Available on Node, provided by the Node$Typings extension

node is an element.
no setter
entityNode → num

Available on Node, provided by the Node$Typings extension

no setter
entityReferenceNode → num

Available on Node, provided by the Node$Typings extension

no setter
firstChild → ChildNode?

Available on Node, provided by the Node$Typings extension

Returns the first child.
no setter
getRootNode ↔ Node Function([GetRootNodeOptions?])

Available on Node, provided by the Node$Typings extension

getter/setter pair
hasChildNodes ↔ bool Function()

Available on Node, provided by the Node$Typings extension

getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
insertBefore ↔ T Function<T extends Node>(T, [Node?])

Available on Node, provided by the Node$Typings extension

getter/setter pair
isConnected → bool

Available on Node, provided by the Node$Typings extension

Returns true if node is connected and false otherwise.
no setter
isDefaultNamespace ↔ bool Function([String? message])

Available on Node, provided by the Node$Typings extension

getter/setter pair
isEqualNode ↔ bool Function([Node?])

Available on Node, provided by the Node$Typings extension

getter/setter pair
isSameNode ↔ bool Function([Node?])

Available on Node, provided by the Node$Typings extension

getter/setter pair
lastChild → ChildNode?

Available on Node, provided by the Node$Typings extension

Returns the last child.
no setter
lookupNamespaceURI ↔ String? Function([String?])

Available on Node, provided by the Node$Typings extension

getter/setter pair
lookupPrefix ↔ String? Function([String?])

Available on Node, provided by the Node$Typings extension

getter/setter pair
nextSibling → ChildNode?

Available on Node, provided by the Node$Typings extension

Returns the next sibling.
no setter
nodeName → String

Available on Node, provided by the Node$Typings extension

Returns a string appropriate for the type of node.
no setter
nodeType → num

Available on Node, provided by the Node$Typings extension

Returns the type of node.
no setter
nodeValue ↔ String?

Available on Node, provided by the Node$Typings extension

MDN Reference
getter/setter pair
normalize ↔ void Function()

Available on Node, provided by the Node$Typings extension

getter/setter pair
notationNode → num

Available on Node, provided by the Node$Typings extension

no setter
ownerDocument → Document?

Available on Node, provided by the Node$Typings extension

Returns the node document. Returns null for documents.
no setter
parentElement → HTMLElement?

Available on Node, provided by the Node$Typings extension

Returns the parent element.
no setter
parentNode → ParentNode?

Available on Node, provided by the Node$Typings extension

Returns the parent.
no setter
previousSibling → ChildNode?

Available on Node, provided by the Node$Typings extension

Returns the previous sibling.
no setter
processingInstructionNode → num

Available on Node, provided by the Node$Typings extension

node is a ProcessingInstruction node.
no setter
removeChild ↔ T Function<T extends Node>(T)

Available on Node, provided by the Node$Typings extension

getter/setter pair
removeEventListener ↔ void Function(String, [Object?, Object?])

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
replaceChild ↔ T Function<T extends Node>(Node, T)

Available on Node, provided by the Node$Typings extension

getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textContent ↔ String?

Available on Node, provided by the Node$Typings extension

MDN Reference
getter/setter pair
textNode → num

Available on Node, provided by the Node$Typings extension

node is a Text node.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

attributeNode → num
no setter
cdataSectionNode → num
node is a CDATASection node.
no setter
commentNode → num
node is a Comment node.
no setter
documentFragmentNode → num
node is a DocumentFragment node.
no setter
documentNode → num
node is a document.
no setter
documentPositionContainedBy → num
Set when other is a descendant of node.
no setter
documentPositionContains → num
Set when other is an ancestor of node.
no setter
documentPositionDisconnected → num
Set when node and other are not in the same tree.
no setter
documentPositionFollowing → num
Set when other is following node.
no setter
documentPositionImplementationSpecific → num
no setter
documentPositionPreceding → num
Set when other is preceding node.
no setter
documentTypeNode → num
node is a doctype.
no setter
elementNode → num
node is an element.
no setter
entityNode → num
no setter
entityReferenceNode → num
no setter
notationNode → num
no setter
processingInstructionNode → num
node is a ProcessingInstruction node.
no setter
textNode → num
node is a Text node.
no setter