NodeFilter | NN 7 IE n/a DOM 2 | ||||||||||||||
The NodeFilter object provides a mechanism for the NodeIterator and TreeWalker objects to determine which nodes or classes of nodes are to be accepted or rejected for inclusion into one of the special node lists. The lone accept( ) method is invoked silently by the NodeInterator and TreeWalker objects whenever the objects are asked to point to the next node in sequence. The NodeFilter object is also the holder of two sets of constants that are used in a variety of creation method calls and user-defined filter functions. See the TreeWalker object for an example, and the document.createTreeWalker( ) method for application of the constants. |
|||||||||||||||
Object Model Reference | |||||||||||||||
NodeFilter |
|||||||||||||||
Object-Specific Properties | |||||||||||||||
|
|||||||||||||||
Object-Specific Methods | |||||||||||||||
|
|||||||||||||||
Object-Specific Event Handler Properties | |||||||||||||||
None. |
accept( ) | NN 7 IE n/a DOM 2 |
accept(nodeReference) | |
Returns an integer signifying whether a node is to be included in the NodeIterator or TreeWalker object's list. This method is invoked automatically by the objects whenever one of their pointer-moving methods is invoked. |
|
Parameters | |
|
|
Returned Value | |
Integer value, each of which has a corresponding constant value associated with the NodeFilter object: 1 (NodeFilter.FILTER_ACCEPT); 2 (NodeFilter.FILTER_REJECT); 3 (NodeFilter.FILTER_SKIP). |