| 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: Filters</title> | 3 <title>DOM Traversal: NodeIterator: Filters</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,
testFilter, false); | 6 var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL,
testFilter, false); |
| 7 // skips text nodes and body element | 7 // skips text nodes and body element |
| 8 var expected = new Array(9, // document | 8 var expected = new Array(9, // document |
| 9 1, // html | 9 1, // html |
| 10 1, // head | 10 1, // head |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 return 1; // FILTER_ACCEPT | 53 return 1; // FILTER_ACCEPT |
| 54 } | 54 } |
| 55 | 55 |
| 56 ]]></script> | 56 ]]></script> |
| 57 </head> | 57 </head> |
| 58 <body onload="doTest()"> | 58 <body onload="doTest()"> |
| 59 <pre id="result">FAIL: Script failed to run.</pre> | 59 <pre id="result">FAIL: Script failed to run.</pre> |
| 60 </body> | 60 </body> |
| 61 <!-- some more nodes to test this: --> | 61 <!-- some more nodes to test this: --> |
| 62 <?body test?> | 62 <?body test?> |
| 63 | 63 <![CDATA[]]> |
| 64 </html> | 64 </html> |
| OLD | NEW |