ElementVisitor
A utility class for visiting elements in the DOM tree.
It is recommended to use the static getVisitor method to obtain instances of this class because they are cached and reused based on the element and selector.
Configs
2
Configs
2The element to visit.
The selector to use when visiting the element or a function which may accept of reject candidate nodes by returning
- NodeFilter.FILTER_ACCEPT
- NodeFilter.FILTER_REJECT
- NodeFilter.FILTER_SKIP
| Parameter | Type | Description |
|---|---|---|
node | Node | The node to accept or reject. |
NodeFilter.FILTER_ACCEPT, NodeFilter.FILTER_REJECT, or NodeFilter.FILTER_SKIP.
Properties
6
Properties
6Class hierarchy
Functions
19
Functions
19Other
Returns an ElementVisitor instance for the given element and selector.
This is the recommended way to get an ElementVisitor instance as it will reuse instances.
| Parameter | Type | Description |
|---|---|---|
element | HTMLElement | The element in which to visit selected descendants. |
selector | String | The selector to use when visiting descendant nodes within the element. |
An ElementVisitor instance which visits the element's descendants based on the selector.