Non-standard
This interface has been renamed to prefixed MozNamedAttrMap, as it has been removed from the spec and only available for Node.attributes. (bugĀ 847195)
A collection of nodes returned by Node.attributes (also potentially for DocumentType.entities, DocumentType.notations). NamedNodeMaps are not in any particular order (unlike NodeList, although they may be accessed by an index as in an array (they may also be accessed with the item method). A NamedNodeMap object are live and will thus be auto-updated if changes are made to their contents internally or elsewhere.
Properties
NamedNodeMap.length (read-only integer)
Methods
| Method | Action | Return |
getNamedItem(nameStr) |
Gets a node by name | Node |
setNamedItem(node) |
Adds (or replaces) a node by its nodeName |
Node |
removeNamedItem(nameStr) |
Removes a node (or if an attribute, may reveal a default if present) | Node |
item(idx) |
Returns the item at the given index (or null if the index is higher or equal to the number of nodes) | Node |
getNamedItemNS(namespaceURI, localName) |
Gets a node by namespaceURI and localName |
Node |
setNamedItemNS(node) |
Adds (or replaces) a node by its localName and namespaceURI |
Node |
removeNamedItemNS(namespaceURI, localName) |
Removes a node (or if an attribute, may reveal a default if present) | Node |
Mozilla Developer Network