NamedNodeMap
NamedNodeMap is an interface in the Document Object Model (DOM) that represents a collection of nodes that can be accessed by name. It is most commonly used to model the attributes of a DOM element, where each attribute is represented by an Attr node within the map.
It is not a generic map or array; it is a live collection. The items in the
Standard methods include getNamedItem(name), setNamedItem(node), removeNamedItem(name), and item(index). In addition, newer specifications introduce namespace-aware variants getNamedItemNS,
Usage typically involves an element’s attributes property, which returns a NamedNodeMap. You can retrieve an attribute
See also: Element, Attr, NodeList, and the broader Document Object Model (DOM) specification.