tor-browser

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

template-contentmethod-prepend-invalid-ref.html (870B)


      1 <!DOCTYPE HTML>
      2 <meta charset="utf-8" />
      3 <title>HTML partial updates - declarative prepend element</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 
      8 <div id="placeholder" contentname="placeholder"><span id="ref">old</span>content</div>
      9 <template contentmethod="prepend">
     10    <div contentname="placeholder"><span>New </span><script id="removal-script">
     11            document.querySelector("#ref").remove();
     12        </script><span>Junk </span></div>
     13 </template>
     14 <script>
     15 test(() => {
     16    document.querySelector("#removal-script").remove();
     17    assert_equals(document.getElementById("placeholder").textContent, "New content");
     18 }, "If the first node is no longer a child of the parent during prepend, next insertions abort");
     19 </script>