CSSUnparsedValue.length

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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:

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

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

Specifications

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

Browser compatibility

BCD tables only load in the browser

See also