DomTreeGenerator

DomTreeGenerator

DomTreeGenerator can traverse DOM and generate TreeNode trees from the visited DOM Nodes

Constructor

new DomTreeGenerator(config)

Source:
Create a new DomTreeGenerator with the given configuration
Parameters:
Name Type Description
config DomTreeGenerator~config

Methods

generateTree(root) → {TreeNode}

Source:
Start generation of a tree
Parameters:
Name Type Description
root Element The element to use as the root for this tree
Returns:
Type
TreeNode

Type Definitions

config

Source:
Properties:
Name Type Attributes Default Description
includeRules Array.<String> <optional>
An array of CSS selectors that represents what should be included even if excluded or transient. If empty, everything that is not excluded will be included.
excludeRules Array.<String> <optional>
An array of CSS selectors that represents what should be excluded.
includeWebstrateTransients boolean <optional>
false Should webstrate transient elements be included true/false
live boolean <optional>
true Is the Tree live, ie. does changes to the dom reflect in the tree.
Type:
  • Object