Professional Documents
Culture Documents
Sign in
English ▼
NamedNodeMap
A NamedNodeMap object is live and will thus be auto-updated if changes are made to its
contents internally or elsewhere.
Although called NamedNodeMap , this interface doesn't deal with Node objects but with
Attr objects, which were originally a specialized class of Node , and still are in some
implementations.
Properties
This interface doesn't inherit any property.
Methods
This interface doesn't inherit any method.
NamedNodeMap.getNamedItem()
Returns a Attr , corresponding to the given name.
NamedNodeMap.setNamedItem()
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap 1/10
07/10/2020 NamedNodeMap - Web APIs | MDN
Replaces, or adds, the Attr identified in the map by the given name.
NamedNodeMap.removeNamedItem()
Removes the Attr identified by the given map.
NamedNodeMap.item()
Returns the Attr at the given index, or null if the index is higher or equal to the number
of nodes.
NamedNodeMap.getNamedItemNS()
Returns a Attr identified by a namespace and related local name.
NamedNodeMap.setNamedItemNS()
Replaces, or adds, the Attr identified in the map by the given namespace and related local
name.
NamedNodeMap.removeNamedItemNS()
Removes the Attr identified by the given namespace and related local name.
Specifications
Specification Status Comment
DOM LS
The definition of 'NamedNodeMap' in Living Deals with Attr instead of Node
that specification. Standard
Browser compatibility
Update compatibility data on GitHub
NamedNodeMap
Chrome Yes
Edge 12
Firefox 34
IE Yes
Opera Yes
Safari Yes
Firefox Android 34
getNamedItem
Chrome Yes
Edge 12
Firefox 34
IE ?
Opera Yes
Safari Yes
Firefox Android 34
getNamedItemNS
Chrome Yes
Edge 12
Firefox 34
IE ?
Opera Yes
Safari Yes
Firefox Android 34
item
Chrome Yes
Edge 12
Firefox 34
IE ?
Opera Yes
Safari Yes
Firefox Android 34
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap 4/10
07/10/2020 NamedNodeMap - Web APIs | MDN
length
Chrome Yes
Edge 12
Firefox 34
IE ?
Opera Yes
Safari Yes
Firefox Android 34
removeNamedItem
Chrome Yes
Edge 12
Firefox 34
IE ?
Opera Yes
Safari Yes
Firefox Android 34
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap 5/10
07/10/2020 NamedNodeMap - Web APIs | MDN
removeNamedItemNS
Chrome Yes
Edge 12
Firefox 34
IE ?
Opera Yes
Safari Yes
Firefox Android 34
setNamedItem
Chrome Yes
Edge 12
Firefox 34
IE ?
Opera Yes
Safari Yes
Firefox Android 34
setNamedItemNS
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap 6/10
07/10/2020 NamedNodeMap - Web APIs | MDN
Chrome Yes
Edge 12
Firefox 34
IE ?
Opera Yes
Safari Yes
Firefox Android 34
Full support
Compatibility unknown
See also
Element.attributes
Related Topics
Document Object Model
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap 7/10
07/10/2020 NamedNodeMap - Web APIs | MDN
NamedNodeMap
▼ Methods
getNamedItem()
AbortController
AbortSignal
AbstractRange
Attr
ByteString
CDATASection
CSSPrimitiveValue
CSSValue
CSSValueList
CharacterData
ChildNode
Comment
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementation
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMPointInit
DOMPointReadOnly
DOMRect
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap 8/10
07/10/2020 NamedNodeMap - Web APIs | MDN
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
Document
DocumentFragment
DocumentType
Element
ElementTraversal
Entity
EntityReference
Event
EventTarget
HTMLCollection
MutationObserver
Node
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
Range
StaticRange
Text
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap 9/10
07/10/2020 NamedNodeMap - Web APIs | MDN
you@example.com
Sign up now
https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap 10/10