The nodeName of Node for JS returns a string appropriate for the type of node.
Type | Description |
---|
Element | Its HTML-uppercased qualified name |
Attr | Its qualified name |
An exclusive Text node | "#text" |
CDATASection | "#cdata-section" |
ProcessingInstruction | Its target |
Comment | "#comment" |
Document | "#document" |
DocumentType | Its name |
DocumentFragment | "#document-fragment" |