CSSUnparsedValue: values() method
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("CSS Typed Object Model API")}} {{AvailableInWorkers}}
The **values()** method of the {{domxref("CSSUnparsedValue")}} interface returns a new _array iterator_ that yields each item in the object.
Syntax
js-nolint
values()Parameters
None.
Return value
A new iterable iterator object.
Examples
Iterating over values
js
const value = new CSSUnparsedValue(["1em", "#445566", "-45px"]);
for (const fragment of value.values()) {
console.log(fragment);
}
// "1em"
// "#445566"
// "-45px"Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{domxref("CSSUnparsedValue.CSSUnparsedValue", "CSSUnparsedValue()")}}
- {{domxref("CSSUnparsedValue.entries()")}}
- {{domxref("CSSUnparsedValue.forEach()")}}
- {{domxref("CSSUnparsedValue.keys()")}}
- {{domxref("CSSUnparsedValue.length")}}
- Using the CSS Typed OM
- CSS Typed Object Model API