This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The CSSUnparsedValue
interface of the CSS Typed Object Model API represents property values that reference custom properties. It consists of a list of string fragments and variable references.
Custom properties are represented by CSSUnparsedValue
and var()
references are represented using CSSVariableReferenceValue
.
Constructor
CSSUnparsedValue.CSSUnparsedValue()
- Creates a new
CSSUnparsedValue
object.
Properties
CSSUnparsedValue.length
- Returns the number of items in the
CSSUnparsedValue
object.
Methods
CSSUnparsedValue.entries()
- Returns an array of a given object's own enumerable property
[key, value]
pairs in the same order as that provided by afor...in
loop (the difference being that a for-in loop enumerates properties in the prototype chain as well). CSSUnparsedValue.forEach()
- Executes a provided function once for each element of the
CSSUnparsedValue
object. CSSUnparsedValue.keys()
- Returns a new
Array Iterator
object that contains the keys for each index in theCSSUnparsedValue
object. CSSUnparsedValue.values()
- Returns a new
Array Iterator
object that contains the values for each index in theCSSUnparsedValue
object.
Specifications
Specification | Status | Comment |
---|---|---|
CSS Typed OM Level 1 The definition of 'CSSUnparsedValue' in that specification. |
Working Draft | Initial definition. |
Browser compatibility
The compatibility table in 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.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
CSSUnparsedValue | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
CSSUnparsedSegment | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
CSSUnparsedValue() constructor | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
entries | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
forEach | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
keys | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
length | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
values | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
@@iterator | Chrome Full support 66 | Edge Full support 79 | Firefox No support No | IE No support No | Opera Full support 53 | Safari No support No | WebView Android Full support 66 | Chrome Android Full support 66 | Firefox Android No support No | Opera Android Full support 47 | Safari iOS No support No | Samsung Internet Android Full support 9.0 |
Legend
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.