This is provided to support some previous usage that accessed the tag name under the nodeName property. The same value is available in the name property of the Attribute object. It may contain some values that the name property does not support.
The following values may be seen in this property:
The tag name also visible via the tagName property of the owning object.
The attribute name for those nodes which are Attribute objects
the value #text for nodes that encapsulate a block of raw text and are textNode objects.