tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

template-contentmethod-style-in-head.html (814B)


      1 <!DOCTYPE HTML>
      2 <meta charset="utf-8" />
      3 <title>HTML partial updates - patch updates style with plain text</title>
      4 <link rel=help href="https://github.com/WICG/declarative-partial-updates">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <style id="placeholder" contentname="cn"></style>
      8 <body>
      9 <div id="target"></div>
     10 <template contentmethod="replace">
     11    <style contentname="cn" id="placeholder">
     12        #target { color: rgba(100, 0, 100); }
     13        #something:after { content: "<div id=dontparseme></div>" };
     14    </style>
     15 </template>
     16 <script>
     17 test(() => {
     18    assert_equals(document.querySelector("#placeholder").firstElementChild, null);
     19    assert_equals(getComputedStyle(document.getElementById("target")).color, "rgb(100, 0, 100)");
     20 });
     21 
     22 </script>