033.html (629B)
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.writeln("<i"); 8 var s = " b='a'>Filler" 9 for (var i=0; i<s.length; i++) { 10 document.write(s[i]+"\n"); 11 } 12 document.writeln("</i"); 13 document.writeln(">"); 14 assert_equals(document.body.childNodes[0].localName, "i"); 15 assert_equals(document.body.childNodes[0].getAttribute("b"), "\na\n"); 16 assert_equals(document.body.childNodes[0].textContent, "\nF\ni\nl\nl\ne\nr\n"); 17 } 18 ); 19 </script> 20 <div id="log"></div>