A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/NamedNodeMap/length below:

NamedNodeMap: length property - Web APIs

MDN Web Docs
  1. Web
  2. Web APIs
  3. NamedNodeMap
  4. length

Filter sidebar

In this article
  1. Document Object Model (DOM)
  2. NamedNodeMap
  3. Instance properties
    1. length
  4. Instance methods
    1. getNamedItem()
    2. getNamedItemNS()
    3. item()
    4. removeNamedItem()
    5. removeNamedItemNS()
    6. setNamedItem()
    7. setNamedItemNS()
  5. Related pages for DOM
    1. AbortController
    2. AbortSignal
    3. AbstractRange
    4. Attr
    5. CDATASection
    6. CharacterData
    7. Comment
    8. CustomEvent
    9. DOMError Deprecated
    10. DOMException
    11. DOMImplementation
    12. DOMParser
    13. DOMPoint
    14. DOMPointReadOnly
    15. DOMRect
    16. DOMTokenList
    17. Document
    18. DocumentFragment
    19. DocumentType
    20. Element
    21. Event
    22. EventTarget
    23. HTMLCollection
    24. MutationObserver
    25. MutationRecord
    26. Node
    27. NodeIterator
    28. NodeList
    29. ProcessingInstruction
    30. Range
    31. StaticRange
    32. Text
    33. TextDecoder
    34. TextEncoder
    35. TimeRanges
    36. TreeWalker
    37. XMLDocument
  6. Guides
    1. Introduction to the DOM
    2. Using the Document Object Model
    3. Attribute reflection
    4. Traversing an HTML table with JavaScript and DOM Interfaces
    5. Locating DOM elements using selectors
    6. Working with events
    7. Examples of web and XML development using the DOM
In this article NamedNodeMap: length property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

The read-only length property of the NamedNodeMap interface is the number of objects stored in the map.

Value

A number containing the number of objects in the map

Example

html

<pre class="foo" id="bar" contenteditable></pre>

js

const pre = document.querySelector("pre");
const attrMap = pre.attributes;
pre.textContent = `The 'test' attribute contains ${attrMap.length} attributes.\n`;
Specifications Specification DOM
# dom-namednodemap-length
Browser compatibility Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on Jun 11, 2025 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4