summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-typed-om/set-css-wide-in-custom-property-crash.html
blob: bc977c9889889bd8a35eccc48ac28e25871b1ec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<title>Don't crash when setting a CSS-wide keyword on a custom property</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
<link rel="help" href="https://crbug.com/1310761<">
<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>