CSSUnparsedValue: length property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The length
read-only property of the
CSSUnparsedValue
interface returns the number of items in the object.
Value
An integer.
Examples
In this example we employ the CSSUnparsedValue()
constructor, then query the length:
js
const values = new CSSUnparsedValue(["1em", "#445566", "-45px"]);
console.log(values.length); // 3
Specifications
Specification |
---|
CSS Typed OM Level 1 # dom-cssunparsedvalue-length |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
length |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.