CSSStyleSheet-constructable-insertRule-base-uri.html (743B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>CSSStyleSheet.insertRule() on a constructable stylesheet uses the right base uri, even if replace/Sync() hasn't been called yet</title> 4 <link rel="author" href="https://mozilla.org" title="Mozilla"> 5 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> 6 <link rel="help" href="https://drafts.csswg.org/cssom/"> 7 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1880718"> 8 <link rel="match" href="CSSStyleSheet-constructable-insertRule-base-uri-ref.html"> 9 <script> 10 const sheet = new CSSStyleSheet(); 11 sheet.insertRule(` 12 :root { 13 background-image: url("../../images/green.png"); 14 } 15 `); 16 document.adoptedStyleSheets.push(sheet); 17 </script>