selectorText-modification-restyle-001.html (630B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>(Test #1) CSSOM - CSSStyleRule.selectorText Modification Restyle - Test #1</title> 4 <link rel="help" href="https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext"> 5 <link rel="match" href="selectorText-modification-restyle-001-ref.html"> 6 7 <style> 8 @namespace bogus url(http://example.com/bogus); 9 10 bogus|div { 11 color: green; 12 } 13 </style> 14 15 <body> 16 <div>I should be green.</div> 17 <script> 18 // Remove the "bogus" namespace--now it should apply to the div above. 19 // We also expect to see a restyle. 20 document.querySelector("style").sheet.cssRules[1].selectorText = "div"; 21 </script> 22 </body>