Node

Overview

The DOM Node interface is a key base class upon which many other DOM API objects are based, thus letting those object types to be used similarly and often interchangeably.

Location


 

appendChild

Adds the specified childNode argument as the last child to the current node. If the argument referenced an existing node on the DOM tree, the node will be detached from its current position and attached at the new position.

 

method appendChild(paraChild: dynamic): Node

 

Node appendChild(dynamic paraChild)

 

func appendChild(_ paraChild: dynamic) -> Node

 

Node appendChild(dynamic paraChild)

 

Function appendChild(paraChild As dynamic) As Node

Parameters:

  • paraChild:

baseURI

 

property baseURI: String read;

 

String baseURI { get; }

 

var baseURI: String { get{} }

 

String baseURI { __get; }

 

ReadOnly Property baseURI() As String

childNodes

 

property childNodes: Node read;

 

Node childNodes { get; }

 

var childNodes: Node { get{} }

 

Node childNodes { __get; }

 

ReadOnly Property childNodes() As Node

cloneNode

Clone a Node, and optionally, all of its contents. By default, it clones the content of the node.

 

method cloneNode par(pardeep: dynamic): Node

 

Node cloneNode par(dynamic pardeep)

 

func cloneNode(par pardeep: dynamic) -> Node

 

Node cloneNode par(dynamic pardeep)

 

Function cloneNode par(pardeep As dynamic) As Node

Parameters:

  • pardeep:

compareDocumentPosition

Compares the position of the current node against another node in any other document.

 

method compareDocumentPosition(parotherNode: dynamic): Int32

 

Int32 compareDocumentPosition(dynamic parotherNode)

 

func compareDocumentPosition(_ parotherNode: dynamic) -> Int32

 

Int32 compareDocumentPosition(dynamic parotherNode)

 

Function compareDocumentPosition(parotherNode As dynamic) As Int32

Parameters:

  • parotherNode:

contains

Returns a Boolean value indicating whether or not a node is a descendant of the calling node.

 

method contains(parotherNode: dynamic): Boolean

 

Boolean contains(dynamic parotherNode)

 

func contains(_ parotherNode: dynamic) -> Boolean

 

Boolean contains(dynamic parotherNode)

 

Function contains(parotherNode As dynamic) As Boolean

Parameters:

  • parotherNode:

firstChild

 

property firstChild: Node read;

 

Node firstChild { get; }

 

var firstChild: Node { get{} }

 

Node firstChild { __get; }

 

ReadOnly Property firstChild() As Node

getRootNode

Returns the context object's root which optionally includes the shadow root if it is available.

 

method getRootNode(paroptions: dynamic): Node

 

Node getRootNode(dynamic paroptions)

 

func getRootNode(_ paroptions: dynamic) -> Node

 

Node getRootNode(dynamic paroptions)

 

Function getRootNode(paroptions As dynamic) As Node

Parameters:

  • paroptions:

hasChildNodes

Returns a Boolean indicating whether or not the element has any child nodes.

 

method hasChildNodes: Node

 

Node hasChildNodes()

 

func hasChildNodes() -> Node

 

Node hasChildNodes()

 

Function hasChildNodes() As Node

insertBefore

Inserts a Node before the reference node as a child of a specified parent node.

 

method insertBefore(parnewNode: dynamic; parreferenceNode: dynamic): Node

 

Node insertBefore(dynamic parnewNode, dynamic parreferenceNode)

 

func insertBefore(_ parnewNode: dynamic, _ parreferenceNode: dynamic) -> Node

 

Node insertBefore(dynamic parnewNode, dynamic parreferenceNode)

 

Function insertBefore(parnewNode As dynamic, parreferenceNode As dynamic) As Node

Parameters:

  • parnewNode:
  • parreferenceNode:

isConnected

 

property isConnected: Boolean read;

 

Boolean isConnected { get; }

 

var isConnected: Boolean { get{} }

 

Boolean isConnected { __get; }

 

ReadOnly Property isConnected() As Boolean

isDefaultNamespace

Accepts a namespace URI as an argument and returns a Boolean with a value of true if the namespace is the default namespace on the given node or false if not.

 

method isDefaultNamespace: Boolean

 

Boolean isDefaultNamespace()

 

func isDefaultNamespace() -> Boolean

 

Boolean isDefaultNamespace()

 

Function isDefaultNamespace() As Boolean

isEqualNode

Returns a Boolean which indicates whether or not two nodes are of the same type and all their defining data points match.

 

method isEqualNode(parotherNode: Node): Node

 

Node isEqualNode(Node parotherNode)

 

func isEqualNode(_ parotherNode: Node) -> Node

 

Node isEqualNode(Node parotherNode)

 

Function isEqualNode(parotherNode As Node) As Node

Parameters:

  • parotherNode:

isSameNode

Returns a Boolean value indicating whether or not the two nodes are the same (that is, they reference the same object).

 

method isSameNode: Node

 

Node isSameNode()

 

func isSameNode() -> Node

 

Node isSameNode()

 

Function isSameNode() As Node

lastChild

 

property lastChild: Node read;

 

Node lastChild { get; }

 

var lastChild: Node { get{} }

 

Node lastChild { __get; }

 

ReadOnly Property lastChild() As Node

lookupNamespaceURI

Accepts a prefix and returns the namespace URI associated with it on the given node if found (and null if not). Supplying null for the prefix will return the default namespace.

 

method lookupNamespaceURI(parprefix: dynamic)

 

void lookupNamespaceURI(dynamic parprefix)

 

func lookupNamespaceURI(_ parprefix: dynamic)

 

void lookupNamespaceURI(dynamic parprefix)

 

Sub lookupNamespaceURI(parprefix As dynamic)

Parameters:

  • parprefix:

nextSibling

 

property nextSibling: Node read;

 

Node nextSibling { get; }

 

var nextSibling: Node { get{} }

 

Node nextSibling { __get; }

 

ReadOnly Property nextSibling() As Node

nodeName

 

property nodeName: Node read;

 

Node nodeName { get; }

 

var nodeName: Node { get{} }

 

Node nodeName { __get; }

 

ReadOnly Property nodeName() As Node

nodeValue

 

property nodeValue: Node read write;

 

Node nodeValue { get; set; }

 

var nodeValue: Node { get{} set{} }

 

Node nodeValue { __get; __set; }

 

Property nodeValue() As Node

normalize

Clean up all the text nodes under this element (merge adjacent, remove empty).

 

method normalize: String

 

String normalize()

 

func normalize() -> String

 

String normalize()

 

Function normalize() As String

ownerDocument

 

property ownerDocument: Document read;

 

Document ownerDocument { get; }

 

var ownerDocument: Document { get{} }

 

Document ownerDocument { __get; }

 

ReadOnly Property ownerDocument() As Document

parentElement

 

property parentElement: Element read;

 

Element parentElement { get; }

 

var parentElement: Element { get{} }

 

Element parentElement { __get; }

 

ReadOnly Property parentElement() As Element

parentNode

 

property parentNode: Node read;

 

Node parentNode { get; }

 

var parentNode: Node { get{} }

 

Node parentNode { __get; }

 

ReadOnly Property parentNode() As Node

previousSibling

 

property previousSibling: Node read;

 

Node previousSibling { get; }

 

var previousSibling: Node { get{} }

 

Node previousSibling { __get; }

 

ReadOnly Property previousSibling() As Node

replaceChild

Replaces one child Node of the current one with the second one given in parameter.

 

method replaceChild(parnewChild: dynamic; paroldChild: dynamic): Node

 

Node replaceChild(dynamic parnewChild, dynamic paroldChild)

 

func replaceChild(_ parnewChild: dynamic, _ paroldChild: dynamic) -> Node

 

Node replaceChild(dynamic parnewChild, dynamic paroldChild)

 

Function replaceChild(parnewChild As dynamic, paroldChild As dynamic) As Node

Parameters:

  • parnewChild:
  • paroldChild:

textContent

 

property textContent: String read write;

 

String textContent { get; set; }

 

var textContent: String { get{} set{} }

 

String textContent { __get; __set; }

 

Property textContent() As String

 

baseURI

 

property baseURI: String read;

 

String baseURI { get; }

 

var baseURI: String { get{} }

 

String baseURI { __get; }

 

ReadOnly Property baseURI() As String

childNodes

 

property childNodes: Node read;

 

Node childNodes { get; }

 

var childNodes: Node { get{} }

 

Node childNodes { __get; }

 

ReadOnly Property childNodes() As Node

firstChild

 

property firstChild: Node read;

 

Node firstChild { get; }

 

var firstChild: Node { get{} }

 

Node firstChild { __get; }

 

ReadOnly Property firstChild() As Node

isConnected

 

property isConnected: Boolean read;

 

Boolean isConnected { get; }

 

var isConnected: Boolean { get{} }

 

Boolean isConnected { __get; }

 

ReadOnly Property isConnected() As Boolean

lastChild

 

property lastChild: Node read;

 

Node lastChild { get; }

 

var lastChild: Node { get{} }

 

Node lastChild { __get; }

 

ReadOnly Property lastChild() As Node

nextSibling

 

property nextSibling: Node read;

 

Node nextSibling { get; }

 

var nextSibling: Node { get{} }

 

Node nextSibling { __get; }

 

ReadOnly Property nextSibling() As Node

nodeName

 

property nodeName: Node read;

 

Node nodeName { get; }

 

var nodeName: Node { get{} }

 

Node nodeName { __get; }

 

ReadOnly Property nodeName() As Node

nodeValue

 

property nodeValue: Node read write;

 

Node nodeValue { get; set; }

 

var nodeValue: Node { get{} set{} }

 

Node nodeValue { __get; __set; }

 

Property nodeValue() As Node

ownerDocument

 

property ownerDocument: Document read;

 

Document ownerDocument { get; }

 

var ownerDocument: Document { get{} }

 

Document ownerDocument { __get; }

 

ReadOnly Property ownerDocument() As Document

parentElement

 

property parentElement: Element read;

 

Element parentElement { get; }

 

var parentElement: Element { get{} }

 

Element parentElement { __get; }

 

ReadOnly Property parentElement() As Element

parentNode

 

property parentNode: Node read;

 

Node parentNode { get; }

 

var parentNode: Node { get{} }

 

Node parentNode { __get; }

 

ReadOnly Property parentNode() As Node

previousSibling

 

property previousSibling: Node read;

 

Node previousSibling { get; }

 

var previousSibling: Node { get{} }

 

Node previousSibling { __get; }

 

ReadOnly Property previousSibling() As Node

textContent

 

property textContent: String read write;

 

String textContent { get; set; }

 

var textContent: String { get{} set{} }

 

String textContent { __get; __set; }

 

Property textContent() As String

 

appendChild

Adds the specified childNode argument as the last child to the current node. If the argument referenced an existing node on the DOM tree, the node will be detached from its current position and attached at the new position.

 

method appendChild(paraChild: dynamic): Node

 

Node appendChild(dynamic paraChild)

 

func appendChild(_ paraChild: dynamic) -> Node

 

Node appendChild(dynamic paraChild)

 

Function appendChild(paraChild As dynamic) As Node

Parameters:

  • paraChild:

cloneNode

Clone a Node, and optionally, all of its contents. By default, it clones the content of the node.

 

method cloneNode par(pardeep: dynamic): Node

 

Node cloneNode par(dynamic pardeep)

 

func cloneNode(par pardeep: dynamic) -> Node

 

Node cloneNode par(dynamic pardeep)

 

Function cloneNode par(pardeep As dynamic) As Node

Parameters:

  • pardeep:

compareDocumentPosition

Compares the position of the current node against another node in any other document.

 

method compareDocumentPosition(parotherNode: dynamic): Int32

 

Int32 compareDocumentPosition(dynamic parotherNode)

 

func compareDocumentPosition(_ parotherNode: dynamic) -> Int32

 

Int32 compareDocumentPosition(dynamic parotherNode)

 

Function compareDocumentPosition(parotherNode As dynamic) As Int32

Parameters:

  • parotherNode:

contains

Returns a Boolean value indicating whether or not a node is a descendant of the calling node.

 

method contains(parotherNode: dynamic): Boolean

 

Boolean contains(dynamic parotherNode)

 

func contains(_ parotherNode: dynamic) -> Boolean

 

Boolean contains(dynamic parotherNode)

 

Function contains(parotherNode As dynamic) As Boolean

Parameters:

  • parotherNode:

getRootNode

Returns the context object's root which optionally includes the shadow root if it is available.

 

method getRootNode(paroptions: dynamic): Node

 

Node getRootNode(dynamic paroptions)

 

func getRootNode(_ paroptions: dynamic) -> Node

 

Node getRootNode(dynamic paroptions)

 

Function getRootNode(paroptions As dynamic) As Node

Parameters:

  • paroptions:

hasChildNodes

Returns a Boolean indicating whether or not the element has any child nodes.

 

method hasChildNodes: Node

 

Node hasChildNodes()

 

func hasChildNodes() -> Node

 

Node hasChildNodes()

 

Function hasChildNodes() As Node

insertBefore

Inserts a Node before the reference node as a child of a specified parent node.

 

method insertBefore(parnewNode: dynamic; parreferenceNode: dynamic): Node

 

Node insertBefore(dynamic parnewNode, dynamic parreferenceNode)

 

func insertBefore(_ parnewNode: dynamic, _ parreferenceNode: dynamic) -> Node

 

Node insertBefore(dynamic parnewNode, dynamic parreferenceNode)

 

Function insertBefore(parnewNode As dynamic, parreferenceNode As dynamic) As Node

Parameters:

  • parnewNode:
  • parreferenceNode:

isDefaultNamespace

Accepts a namespace URI as an argument and returns a Boolean with a value of true if the namespace is the default namespace on the given node or false if not.

 

method isDefaultNamespace: Boolean

 

Boolean isDefaultNamespace()

 

func isDefaultNamespace() -> Boolean

 

Boolean isDefaultNamespace()

 

Function isDefaultNamespace() As Boolean

isEqualNode

Returns a Boolean which indicates whether or not two nodes are of the same type and all their defining data points match.

 

method isEqualNode(parotherNode: Node): Node

 

Node isEqualNode(Node parotherNode)

 

func isEqualNode(_ parotherNode: Node) -> Node

 

Node isEqualNode(Node parotherNode)

 

Function isEqualNode(parotherNode As Node) As Node

Parameters:

  • parotherNode:

isSameNode

Returns a Boolean value indicating whether or not the two nodes are the same (that is, they reference the same object).

 

method isSameNode: Node

 

Node isSameNode()

 

func isSameNode() -> Node

 

Node isSameNode()

 

Function isSameNode() As Node

lookupNamespaceURI

Accepts a prefix and returns the namespace URI associated with it on the given node if found (and null if not). Supplying null for the prefix will return the default namespace.

 

method lookupNamespaceURI(parprefix: dynamic)

 

void lookupNamespaceURI(dynamic parprefix)

 

func lookupNamespaceURI(_ parprefix: dynamic)

 

void lookupNamespaceURI(dynamic parprefix)

 

Sub lookupNamespaceURI(parprefix As dynamic)

Parameters:

  • parprefix:

normalize

Clean up all the text nodes under this element (merge adjacent, remove empty).

 

method normalize: String

 

String normalize()

 

func normalize() -> String

 

String normalize()

 

Function normalize() As String

replaceChild

Replaces one child Node of the current one with the second one given in parameter.

 

method replaceChild(parnewChild: dynamic; paroldChild: dynamic): Node

 

Node replaceChild(dynamic parnewChild, dynamic paroldChild)

 

func replaceChild(_ parnewChild: dynamic, _ paroldChild: dynamic) -> Node

 

Node replaceChild(dynamic parnewChild, dynamic paroldChild)

 

Function replaceChild(parnewChild As dynamic, paroldChild As dynamic) As Node

Parameters:

  • parnewChild:
  • paroldChild: