The setNamedItem() method of the NamedNodeMap interface puts the Attr identified by its name in the map.
setNamedItem()
MDN Reference