tor-browser

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

dom-parts-parseparts-on-root.tentative.html (718B)


      1 <!DOCTYPE html>
      2 <html parseparts>
      3 <title>DOM Parts: parseparts on root</title>
      4 <link rel=author href="mailto:masonf@chromium.org">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="./resources/domparts-utils.js"></script>
      8 
      9 <div>{{#}}Parts{{/}}</div>
     10 
     11 <script>
     12  test(() => {
     13    const target = document.currentScript.previousElementSibling;
     14    assert_true(document.documentElement.hasAttribute('parseparts'));
     15    const root = document.getPartRoot();
     16    assert_equals(root.getParts().length,0);
     17    assert_equals(target.innerHTML,'{{#}}Parts{{/}}');
     18    target.remove();
     19  }, 'It is not possible to put parseparts on the root element');
     20 </script>