CSS Typed Object Model API
The length read-only property of the CSSUnparsedValue interface returns the number of items in the object.
Value
An integer.
Examples
Basic usage
In this example, we use the CSSUnparsedValue.CSSUnparsedValue constructor, then query the length:
const value = new CSSUnparsedValue(["1em", "#445566", "-45px"]);
console.log(value.length); // 3
Specifications
Browser compatibility
See also
- CSSUnparsedValue.CSSUnparsedValue
- CSSUnparsedValue.entries()
- CSSUnparsedValue.forEach()
- CSSUnparsedValue.keys()
- CSSUnparsedValue.values()
- Using the CSS Typed OM
- CSS Typed Object Model API
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
