DOMNode (JavaScript)

Represents a node in the Document Object Model.

Defined in

DOM (JavaScript)

Usage

This class provides base methods for the other classes in the DOM (JavaScript) library.
The values of getNodeType, getNodeName, getNodeValue, and getAttributes vary according to the node type as follows:
Class Node type Node name Node value Attributes
DOMAttr 2 Name of attribute Value of attribute null
DOMCDATASection 4 #cdata-section Content of CDATA section null
DOMComment 8 #comment Content of comment null
DOMDocument 9 #document null null
DOMDocumentFragment 11 #document-fragment null null
DOMDocumentType 10 Name of document type null null
DOMElement 1 Tag name of element null NamedNodeMap
DOMEntity 6 ??? Name of entity null null
DOMEntityReference 5 Name of entity referenced null null
DOMNotation 12 ??? Name of notation null null
DOMProcessingInstruction 7 Target of instruction Data content of instruction null
DOMText 3 #text Content of text null