tor-browser

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

iframe_007.html (603B)


      1 <!doctype html>
      2 <title>document.write comment into iframe</title>
      3 <script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>
      4 <iframe id="test"></iframe>
      5 <script>
      6 test(function() {
      7  var iframe = document.getElementById("test");
      8  var s = "<!--Filler-->";
      9  for (var i=0; i<s.length; i++) {
     10    iframe.contentDocument.write(s);
     11  }
     12  iframe.contentDocument.close();
     13  assert_equals(iframe.contentDocument.childNodes[0].nodeType, document.COMMENT_NODE);
     14  assert_equals(iframe.contentDocument.childNodes[0].data, "Filler");
     15 });
     16 </script>
     17 <div id="log"></div>