NodeSet (engine/model)


Node | TextProxy | String | NodeList | DocumentFragment | Iterable

Value that can be normalized to an array of nodes.

Non-arrays are normalized as follows:

  • Node is left as is,
  • TextProxy and String are normalized to Text,
  • NodeList is normalized to an array containing all nodes that are in that node list,
  • DocumentFragment is normalized to an array containing all of it's
  • children.

Arrays are processed item by item like non-array values and flattened to one array. Normalization always results in a flat array of nodes. Consecutive text nodes (or items normalized to text nodes) will be merged if they have same attributes.