try { doc = rootNode.getOwnerDocument ();
This is why for debugging you _don't_ want to catch exceptions, or at
least log them in the catch blocks! That line throws. You want
rootNode.ownerDocument instead.
do you mean something like that ?
1.try {
2. doc = rootNode.ownerDocument;
3. // checking if the Traversal module is supported by the DOM
implementation available ...
4. if (!doc.implementation.hasFeature("Traversal", 2.0) ) {
5. dump ( "A DOM implementation that supports traversal is
required.");
6. return;
7. }
8. /* IS IT NECESSARY ? */
9. /* traversable = (DocumentTraversal) doc;
10. if (traversable == null)
11. dump ("traversable is null \n");
12. */
13. iterator = doc.createNodeIterator(rootNode,
NodeFilter.SHOW_ALL, filteringRelevantNodes, true);
} catch (e) {
dump ("Exception: " + e + "\n");
}
It throws both at lines 4 and 13 , showing the following message
"Exception: TypeError: doc has no properties". What is missing ?
regards
ps: thanks to boris ;)
_______________________________________________
mozilla-layout mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-layout