Interface

Node

Node

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.

View Source js/lib.dom.d.ts, line 5125

Members

string

# baseURI

Returns node's node document's document base URL.

View Source js/lib.dom.d.ts, line 5128

number

# CDATA_SECTION_NODE

node is a CDATASection node.

View Source js/lib.dom.d.ts, line 5227

NodeListOf.<ChildNode>

# childNodes

Returns the children.

View Source js/lib.dom.d.ts, line 5133

Node

# cloneNode

Returns a copy of node. If deep is true, the copy also includes the node's descendants.

View Source js/lib.dom.d.ts, line 5192

number

# COMMENT_NODE

node is a Comment node.

View Source js/lib.dom.d.ts, line 5232

number

# compareDocumentPosition

Returns a bitmask indicating the position of other relative to node.

View Source js/lib.dom.d.ts, line 5197

boolean

# contains

Returns true if other is an inclusive descendant of node, and false otherwise.

View Source js/lib.dom.d.ts, line 5202

number

# DOCUMENT_FRAGMENT_NODE

node is a DocumentFragment node.

View Source js/lib.dom.d.ts, line 5237

number

# DOCUMENT_NODE

node is a document.

View Source js/lib.dom.d.ts, line 5242

number

# DOCUMENT_POSITION_CONTAINED_BY

Set when other is a descendant of node.

View Source js/lib.dom.d.ts, line 5247

number

# DOCUMENT_POSITION_CONTAINS

Set when other is an ancestor of node.

View Source js/lib.dom.d.ts, line 5252

number

# DOCUMENT_POSITION_DISCONNECTED

Set when node and other are not in the same tree.

View Source js/lib.dom.d.ts, line 5257

number

# DOCUMENT_POSITION_FOLLOWING

Set when other is following node.

View Source js/lib.dom.d.ts, line 5262

number

# DOCUMENT_POSITION_PRECEDING

Set when other is preceding node.

View Source js/lib.dom.d.ts, line 5267

number

# DOCUMENT_TYPE_NODE

node is a doctype.

View Source js/lib.dom.d.ts, line 5272

number

# ELEMENT_NODE

node is an element.

View Source js/lib.dom.d.ts, line 5277

ChildNode | null

# firstChild

Returns the first child.

View Source js/lib.dom.d.ts, line 5138

Node

# getRootNode

Returns node's root.

View Source js/lib.dom.d.ts, line 5207

boolean

# hasChildNodes

Returns whether node has children.

View Source js/lib.dom.d.ts, line 5212

boolean

# isConnected

Returns true if node is connected and false otherwise.

View Source js/lib.dom.d.ts, line 5143

boolean

# isEqualNode

Returns whether node and otherNode have the same properties.

View Source js/lib.dom.d.ts, line 5217

ChildNode | null

# lastChild

Returns the last child.

View Source js/lib.dom.d.ts, line 5148

string | null

# namespaceURI

Deprecated:
  • Yes

View Source js/lib.dom.d.ts, line 5153

ChildNode | null

# nextSibling

Returns the next sibling.

View Source js/lib.dom.d.ts, line 5157

string

# nodeName

Returns a string appropriate for the type of node.

View Source js/lib.dom.d.ts, line 5162

number

# nodeType

Returns the type of node.

View Source js/lib.dom.d.ts, line 5167

void

# normalize

Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

View Source js/lib.dom.d.ts, line 5222

Document | null

# ownerDocument

Returns the node document. Returns null for documents.

View Source js/lib.dom.d.ts, line 5172

HTMLElement | null

# parentElement

Returns the parent element.

View Source js/lib.dom.d.ts, line 5177

Node | ParentNode | null

# parentNode

Returns the parent.

View Source js/lib.dom.d.ts, line 5182

ChildNode | null

# previousSibling

Returns the previous sibling.

View Source js/lib.dom.d.ts, line 5187

number

# PROCESSING_INSTRUCTION_NODE

node is a ProcessingInstruction node.

View Source js/lib.dom.d.ts, line 5282

number

# TEXT_NODE

node is a Text node.

View Source js/lib.dom.d.ts, line 5287