Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. StylePropertyMapReadOnly
  4. size

StylePropertyMapReadOnly: size property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Thesize read-only property of theStylePropertyMapReadOnly interface returns an unsigned long integercontaining the size of theStylePropertyMapReadOnly object.

Value

An unsigned long integer.

Examples

Here we use the size property to return the total entries within the button elementscomputedStyleMap.

js
// grab our elementconst buttonEl = document.querySelector("button");// we can retrieve all computed styles with `computedStyleMap`const allComputedStyles = buttonEl.computedStyleMap();// use size to get the total styles within the mapconst amountStyles = allComputedStyles.size;console.log(amountStyles); // logs 338

Specifications

Specification
CSS Typed OM Level 1
# dom-stylepropertymapreadonly-size

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp