| OLD | NEW |
| 1 <html xmlns="http://www.w3.org/1999/xhtml"> | 1 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 2 <head> | 2 <head> |
| 3 <title>DOM Traversal: NodeIterator: Basics</title> | 3 <title>DOM Traversal: NodeIterator: Basics</title> |
| 4 <script type="text/javascript"> <![CDATA[ | 4 <script type="text/javascript"> <![CDATA[ |
| 5 function doTest() { | 5 function doTest() { |
| 6 var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL,
null, false); | 6 var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL,
null, false); |
| 7 var expected = new Array(9, // document | 7 var expected = new Array(9, // document |
| 8 1, // html | 8 1, // html |
| 9 3, 1, // head | 9 3, 1, // head |
| 10 3, 1, 3, // title | 10 3, 1, 3, // title |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 else | 42 else |
| 43 p.firstChild.data = 'PASS'; | 43 p.firstChild.data = 'PASS'; |
| 44 } | 44 } |
| 45 ]]></script> | 45 ]]></script> |
| 46 </head> | 46 </head> |
| 47 <body onload="doTest()"> | 47 <body onload="doTest()"> |
| 48 <pre id="result">FAIL: Script failed to run.</pre> | 48 <pre id="result">FAIL: Script failed to run.</pre> |
| 49 </body> | 49 </body> |
| 50 <!-- some more nodes to test this: --> | 50 <!-- some more nodes to test this: --> |
| 51 <?test node?> | 51 <?test node?> |
| 52 | 52 <![CDATA[]]> |
| 53 </html> | 53 </html> |
| OLD | NEW |