Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

Node

Summary

This is a scriptable interface corresponding to the nsIDOMNode XPCOM interface.

Constants

The nsIDOMNode interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree.

For more information on this interface please see DOM-Level-2-Core

short ELEMENT_NODE 1
short ATTRIBUTE_NODE 2
short TEXT_NODE 3
short CDATA_SECTION_NODE 4
short ENTITY_REFERENCE_NODE 5
short ENTITY_NODE 6
short PROCESSING_INSTRUCTION_NODE 7
short COMMENT_NODE 8
short DOCUMENT_NODE 9
short DOCUMENT_TYPE_NODE 10
short DOCUMENT_FRAGMENT_NODE 11
short NOTATION_NODE 12

Methods

Node appendChild ( Node newChild )
Node cloneNode ( boolean deep )
boolean hasAttributes ( )
boolean hasChildNodes ( )
Node insertBefore ( Node newChild , Node refChild )
boolean isSupported ( String feature , String version )
void normalize ( )
Node removeChild ( Node oldChild )
Node replaceChild ( Node newChild , Node oldChild )

Document Tags and Contributors

 Contributors to this page: Sheppy, Pmash
 Last updated by: Sheppy,