Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-typed-om/set-css-wide-in-custom-property-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Don't crash when setting a CSS-wide keyword on a custom property</title>
<div id="target">
Don't crash
</div>
<script>
for (let keyword of ['initial', 'inherit', 'unset', 'revert', 'revert-layer']) {
try {
target.attributeStyleMap.set('--x', new CSSKeywordValue(keyword));
} catch (e) {
}
}
</script>