View Source Tamnoon.DOM.NodeCollection (Tamnoon v1.0.0-rc.3)
Represents a DOM node collection. Accepts two parameters for how to select the nodes,
:selector_type and :selector_value. For example, when :selector_type is :children and
:selector_value is a Tamnoon.DOM.Node.t/0, it will be equivalent to using
element.children() in JS.
Fields
:selector_type– an atom indicating the type of selector.- Expected values:
:xpath,:query,:children.
- Expected values:
:selector_value– the value associated with the selector.:xpath: aString.t/0of the xpath to select by.:query: aString.t/0of the query selector to select by.:children: aTamnoon.DOM.Node.t/0of the parent node.
Summary
Functions
Constructs a Tamnoon.DOM.NodeCollection.t/0 with the following arguments
Types
@type t() :: %Tamnoon.DOM.NodeCollection{ selector_type: :xpath | :query | :children, selector_value: String.t() | Tamnoon.DOM.Node.t() }
Functions
@spec new!(node_collection :: term()) :: %Tamnoon.DOM.NodeCollection{ selector_type: term(), selector_value: term() }
Constructs a Tamnoon.DOM.NodeCollection.t/0 with the following arguments:
:selector_type– an atom (:xpath,:queryor:children).:selector_value– aString.t/0the value associated with the selector.:xpath: aString.t/0of the xpath to select by.:query: aString.t/0of the query selector to select by.:children: aTamnoon.DOM.Node.t/0of the parent node.