015.html (560B)
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 id='test'"); 8 document.write("class='a'>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.getAttribute("class"), "a"); 12 assert_equals(document.body.firstChild.textContent, "Filler Text"); 13 } 14 ); 15 </script> 16 <div id="log"></div>