tor-browser

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

017.html (665B)


      1 <!doctype html>
      2 <title>document.write</title>
      3 <script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>
      4 <script>
      5 test(
      6 function() {
      7  var s = "<i id=test>Filler Text</i><b>Filler Text"
      8  for (var i=0; i<s.length; i++) {
      9    document.write(s[i]);
     10  }
     11  assert_equals(document.body.firstChild.localName, "i");
     12  assert_equals(document.body.firstChild.getAttribute('id'), "test");
     13  assert_equals(document.body.firstChild.textContent, "Filler Text");
     14  assert_equals(document.body.childNodes[1].localName, "b");
     15  assert_equals(document.body.childNodes[1].textContent, "Filler Text");
     16 }
     17 );
     18 </script>
     19 <div id="log"></div>