summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/cssom/selectorText-modification-restyle-001.html
blob: 43a76d1ef2e99f1874793da7e74f27dd6e32e134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!doctype html>
<meta charset="utf-8">
<title>(Test #1) CSSOM - CSSStyleRule.selectorText Modification Restyle - Test #1</title>
<link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext">
<link rel="match" href="selectorText-modification-restyle-001-ref.html">

<style>
@namespace bogus url(http://example.com/bogus);

bogus|div {
  color: green;
}
</style>

<body>
<div>I should be green.</div>
<script>
// Remove the "bogus" namespace--now it should apply to the div above.
// We also expect to see a restyle.
document.querySelector("style").sheet.cssRules[1].selectorText = "div";
</script>
</body>