| 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 Backwards</title> | 3 <title>DOM Traversal: NodeIterator: Basics Backwards</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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 else | 43 else |
| 44 p.firstChild.data = 'PASS'; | 44 p.firstChild.data = 'PASS'; |
| 45 } | 45 } |
| 46 ]]></script> | 46 ]]></script> |
| 47 </head> | 47 </head> |
| 48 <body onload="doTest()"> | 48 <body onload="doTest()"> |
| 49 <pre id="result">FAIL: Script failed to run.</pre> | 49 <pre id="result">FAIL: Script failed to run.</pre> |
| 50 </body> | 50 </body> |
| 51 <!-- some more nodes to test this: --> | 51 <!-- some more nodes to test this: --> |
| 52 <?test node?> | 52 <?test node?> |
| 53 | 53 <![CDATA[]]> |
| 54 </html> | 54 </html> |
| OLD | NEW |