I have a page that I (try to) use for testing my regular expressions:
The page has a form for
inputting the regular expression
inputting the text to test the regexp against
optional input for those who want to see the effect of a <string>.replace() method call
Most importantly, it has a results area which shows the effect of the .search(), .match(), and .replace() method calls.
I am trying to debug the .match() results area. It makes use of my [FONT="Courier New"]tables.js[/FONT] script, which actually creates an object being a table constructor which is supposed to manage tables (rows, colums, cells) dynamically, storing DOM node objects within the constructred object (the object is not the DOM table node, but a property of the constructed object points to the DOM table node).
The script makes use of the DOM Traversal and Range in browsers (like Firefox, which I use in development) where it is implemented.
My problem is that I am calling [FONT="Courier New"]document.createTreeWalker()[/FONT] at line 87 in the table.js file, and getting a NS_ERROR_DOM_NOT_SUPPORTED_ERR in FF. The W3 specification says this happens if you try to set the [FONT="Courier New"].currentNode[/FONT] property to [FONT="Courier New"]null[/FONT].
Everything looks proper in my call, AFAICS.
I am running through Firebug to see what is happening. It happens when the DOM node is the element thead. Is there a reason thead is not a proper node?
Also, I make multiple calls to .createTreeWalker(). Is there a reason multiple calls cannot be made? Or is the implementation of DOM Traversal not fully debugged in FF?