008.html (481B)
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 document.write("<i i"); 8 document.write("d='test'>Filler Text"); 9 assert_equals(document.body.firstChild.localName, "i"); 10 assert_equals(document.body.firstChild.getAttribute("id"), "test"); 11 assert_equals(document.body.firstChild.textContent, "Filler Text"); 12 } 13 ); 14 </script> 15 <div id="log"></div>