Comments: Cool tip of the day: Node filters in JS as objects

That looks very useful in some of the WF2 code...

Can you use that in C++?

(From Alex: Actually, you have to. JavaScript is the one bending the rules by allowing you to pass a function in. In C++ land, you must explicitly define a nsIDOMNodeFilter* object. Reference my xpathgen patch in bug 319768 for the only example I know of with a C++-based node filter. :-) )

Posted by Shawn Wilsher at October 25, 2006 2:37 PM