MDN self-hosted library · e01.org

CSSUnparsedValue: forEach() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const value = new CSSUnparsedValue(["1em", "#445566", "-45px"]);

value.forEach((fragment, index) => {
  console.log(index, fragment);
});
// 0 "1em"
// 1 "#445566"
// 2 "-45px"