1.9.5.4
Prysm
Node Interface Reference

The basic document node. More...

+ Inheritance diagram for Node:

Public Member Functions

Node removeChild (Node oldChild)
 remove a child node More...
 
Node appendChild (Node newChild)
 append a node as a child More...
 
Node replaceChild (Node newChild, Node oldChild)
 replace oldChild with newChild More...
 
Node insertBefore (Node node, Node? referenceNode)
 insert a node before the reference node, as a child of the current node More...
 
Node cloneNode (optional boolean deep=false)
 
boolean isEqualNode (Node? otherNode)
 
boolean isSameNode (Node? otherNode)
 
boolean hasChildNodes ()
 
boolean contains (Node? other)
 
DOMString lookupPrefix (DOMString? namespace)
 
boolean isDefaultNamespace (DOMString? namespace)
 
void normalize ()
 
unsigned short compareDocumentPosition (Node other)
 
Node getRootNode (optional GetRootNodeOptions options)
 
DOMString lookupNamespaceURI (DOMString? prefix)
 
- Public Member Functions inherited from EventTarget
void addEventListener (DOMInternedString type, EventListener listener, [Default=Undefined] optional boolean useCapture)
 
void removeEventListener (DOMInternedString type, EventListener listener, [Default=Undefined] optional boolean useCapture)
 
boolean dispatchEvent (Event event)
 

Public Attributes

readonly attribute DOMString nodeName
 
attribute DOMString nodeValue
 
attribute DOMString textContent
 
readonly attribute unsigned short nodeType
 type of the node More...
 
readonly attribute Node parentNode
 parent of the node More...
 
readonly attribute Element parentElement
 parent element of the node. If parent is not an Element, returns null. More...
 
readonly attribute NodeList childNodes
 list of the children of this node More...
 
readonly attribute Node firstChild
 the node's first child in the tree, or null if the node is childless More...
 
readonly attribute Node lastChild
 last child of the node, or null if there are no child elements More...
 
readonly attribute Node previousSibling
 the node immediately preceding the specified one in its parent's children, or null if the specified node is the first in that list More...
 
readonly attribute Node nextSibling
 the node immediately following the specified one in its parent's children, or null if the specified node is the last node in that list More...
 
readonly attribute Document ownerDocument
 The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null. More...
 
readonly attribute USVString baseURI
 
readonly attribute boolean isConnected
 
Node type
const unsigned short ELEMENT_NODE = 1
 
const unsigned short ATTRIBUTE_NODE = 2
 
const unsigned short TEXT_NODE = 3
 
const unsigned short CDATA_SECTION_NODE = 4
 
const unsigned short ENTITY_REFERENCE_NODE = 5
 
const unsigned short ENTITY_NODE = 6
 
const unsigned short PROCESSING_INSTRUCTION_NODE = 7
 
const unsigned short COMMENT_NODE = 8
 
const unsigned short DOCUMENT_NODE = 9
 
const unsigned short DOCUMENT_TYPE_NODE = 10
 
const unsigned short DOCUMENT_FRAGMENT_NODE = 11
 
const unsigned short NOTATION_NODE = 12
 
Document position
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01
 
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02
 
const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04
 
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08
 
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10
 
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
 

Detailed Description

The basic document node.

Member Function Documentation

◆ appendChild()

Node Node::appendChild ( Node  newChild)

append a node as a child

Parameters
newChildthe node to append
Returns
the appended child node

◆ cloneNode()

Node Node::cloneNode ( optional boolean  deep = false)
Returns
a clone of the node

◆ compareDocumentPosition()

unsigned short Node::compareDocumentPosition ( Node  other)

◆ contains()

boolean Node::contains ( Node other)

◆ getRootNode()

Node Node::getRootNode ( optional GetRootNodeOptions  options)

◆ hasChildNodes()

boolean Node::hasChildNodes ( )

◆ insertBefore()

Node Node::insertBefore ( Node  node,
Node referenceNode 
)

insert a node before the reference node, as a child of the current node

Parameters
nodethe new node to be inserted
referenceNodethe reference node (if null, node will be inserted at the end of the child nodes list)
Returns
the inserted node

◆ isDefaultNamespace()

boolean Node::isDefaultNamespace ( DOMString?  namespace)

◆ isEqualNode()

boolean Node::isEqualNode ( Node otherNode)

◆ isSameNode()

boolean Node::isSameNode ( Node otherNode)

◆ lookupNamespaceURI()

DOMString Node::lookupNamespaceURI ( DOMString?  prefix)

◆ lookupPrefix()

DOMString Node::lookupPrefix ( DOMString?  namespace)

◆ normalize()

void Node::normalize ( )

◆ removeChild()

Node Node::removeChild ( Node  oldChild)

remove a child node

Parameters
oldChildthe child node to be removed
Returns
the removed child node

◆ replaceChild()

Node Node::replaceChild ( Node  newChild,
Node  oldChild 
)

replace oldChild with newChild

Returns
the replaced child node

Member Data Documentation

◆ ATTRIBUTE_NODE

const unsigned short Node::ATTRIBUTE_NODE = 2

◆ baseURI

readonly attribute USVString Node::baseURI

◆ CDATA_SECTION_NODE

const unsigned short Node::CDATA_SECTION_NODE = 4

◆ childNodes

readonly attribute NodeList Node::childNodes

list of the children of this node

◆ COMMENT_NODE

const unsigned short Node::COMMENT_NODE = 8

◆ DOCUMENT_FRAGMENT_NODE

const unsigned short Node::DOCUMENT_FRAGMENT_NODE = 11

◆ DOCUMENT_NODE

const unsigned short Node::DOCUMENT_NODE = 9

◆ DOCUMENT_POSITION_CONTAINED_BY

const unsigned short Node::DOCUMENT_POSITION_CONTAINED_BY = 0x10

◆ DOCUMENT_POSITION_CONTAINS

const unsigned short Node::DOCUMENT_POSITION_CONTAINS = 0x08

◆ DOCUMENT_POSITION_DISCONNECTED

const unsigned short Node::DOCUMENT_POSITION_DISCONNECTED = 0x01

◆ DOCUMENT_POSITION_FOLLOWING

const unsigned short Node::DOCUMENT_POSITION_FOLLOWING = 0x04

◆ DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

const unsigned short Node::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20

◆ DOCUMENT_POSITION_PRECEDING

const unsigned short Node::DOCUMENT_POSITION_PRECEDING = 0x02

◆ DOCUMENT_TYPE_NODE

const unsigned short Node::DOCUMENT_TYPE_NODE = 10

◆ ELEMENT_NODE

const unsigned short Node::ELEMENT_NODE = 1

◆ ENTITY_NODE

const unsigned short Node::ENTITY_NODE = 6

◆ ENTITY_REFERENCE_NODE

const unsigned short Node::ENTITY_REFERENCE_NODE = 5

◆ firstChild

readonly attribute Node Node::firstChild

the node's first child in the tree, or null if the node is childless

◆ isConnected

readonly attribute boolean Node::isConnected

◆ lastChild

readonly attribute Node Node::lastChild

last child of the node, or null if there are no child elements

◆ nextSibling

readonly attribute Node Node::nextSibling

the node immediately following the specified one in its parent's children, or null if the specified node is the last node in that list

◆ nodeName

readonly attribute DOMString Node::nodeName

◆ nodeType

readonly attribute unsigned short Node::nodeType

type of the node

◆ nodeValue

attribute DOMString Node::nodeValue

◆ NOTATION_NODE

const unsigned short Node::NOTATION_NODE = 12

◆ ownerDocument

readonly attribute Document Node::ownerDocument

The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null.

◆ parentElement

readonly attribute Element Node::parentElement

parent element of the node. If parent is not an Element, returns null.

◆ parentNode

readonly attribute Node Node::parentNode

parent of the node

◆ previousSibling

readonly attribute Node Node::previousSibling

the node immediately preceding the specified one in its parent's children, or null if the specified node is the first in that list

◆ PROCESSING_INSTRUCTION_NODE

const unsigned short Node::PROCESSING_INSTRUCTION_NODE = 7

◆ TEXT_NODE

const unsigned short Node::TEXT_NODE = 3

◆ textContent

attribute DOMString Node::textContent