3 <script src=traversal.js
language=
"JavaScript" type=
"text/JavaScript" ></script>
4 <title>Traversal Test
</title>
41 <div style=
"font-family: Courier; font-size: 14; white-space: pre">
43 if (window
.testRunner
)
44 testRunner
.dumpAsText();
46 var root
= document
.getElementById('test');
47 var start
= document
.getElementById('A');
49 function testNodeFiter(n
)
51 if (n
.tagName
== 'SPAN') return NodeFilter
.FILTER_ACCEPT
;
52 return NodeFilter
.FILTER_SKIP
;
55 var tw
= document
.createTreeWalker(root
, NodeFilter
.SHOW_ELEMENT
, testNodeFiter
, false);
56 document
.write(dumpTreeWalker(tw
, start
));