OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script type="text/javascript"> |
| 4 function runTest() |
| 5 { |
| 6 if (window.testRunner) |
| 7 testRunner.dumpAsText(); |
| 8 |
| 9 var ns = 'http://www.w3.org/1999/xhtml'; |
| 10 var xhtml = document.implementation.createDocument(ns , 'html', null); |
| 11 |
| 12 var p = xhtml.createElementNS(ns, 'p'); |
| 13 p.textContent = '(0 < 1 && 1 > 0)'; |
| 14 xhtml.documentElement.appendChild(p); |
| 15 |
| 16 var script = xhtml.createElementNS(ns, 'script'); |
| 17 script.textContent = 'if (0 < 1 && 1 > 0) { };'; |
| 18 xhtml.documentElement.appendChild(script); |
| 19 |
| 20 var style = xhtml.createElementNS(ns, 'style'); |
| 21 style.textContent = '/* < > & */'; |
| 22 xhtml.documentElement.appendChild(style); |
| 23 |
| 24 var serializer = new XMLSerializer(); |
| 25 var xmlString = serializer.serializeToString(xhtml); |
| 26 |
| 27 var outputText = document.getElementById("output"); |
| 28 outputText.textContent = xmlString; |
| 29 } |
| 30 </script> |
| 31 </head> |
| 32 <body onload="runTest()"> |
| 33 <div id="output"/> |
| 34 </body> |
| 35 </html> |
OLD | NEW |