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

FILTER_ACCEPT | FILTER_REJECT | FILTER_SKIP
SHOW_ALL | SHOW_ATTRIBUTE | SHOW_CDATA_SECTION
SHOW_COMMENT | SHOW_DOCUMENT | SHOW_DOCUMENT_FRAGMENT
SHOW_DOCUMENT_TYPE | SHOW_ELEMENT | SHOW_ENTITY
SHOW_NOTATION | SHOW_PROCESSING_INSTRUCTION | SHOW_TEXT

Object-Specific Methods

accept( )

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

- Reference to the document tree node under test. Passed automatically to the method when invoked by the NodeInterator and TreeWalker objects.

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).