tor-browser

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

iframe_008.html (734B)


      1 <!doctype html>
      2 <title>document.write plaintext 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 = "<plaintext><span>Filler Text";
      9  for (var i=0; i<s.length; i++) {
     10    iframe.contentDocument.write(s[i]);
     11  }
     12  iframe.contentDocument.close();
     13  assert_equals(iframe.contentDocument.body.childNodes[0].nodeType, document.ELEMENT_NODE);
     14  assert_equals(iframe.contentDocument.body.childNodes[0].localName, "plaintext");
     15  assert_equals(iframe.contentDocument.body.childNodes[0].textContent, "<span>Filler Text");
     16 });
     17 </script>
     18 <div id="log"></div>