CSSUnparsedValue: length プロパティ

Limited availability

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

lengthCSSUnparsedValue インターフェイスの読み取り専用プロパティで、オブジェクト内の項目数を返します。

整数です。

この例では、CSSUnparsedValue() コンストラクターを使用したあと、長さを照会しています。

js
const values = new CSSUnparsedValue(["1em", "#445566", "-45px"]);

console.log(values.length); // 3

仕様書

Specification
CSS Typed OM Level 1
# dom-cssunparsedvalue-length

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
length

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

関連情報