Edit this page

up.fragment up.fragment.subtree(root, selector)
JavaScript function

Returns a list of a root element's descendants matching the given selector.

If the root element itself matches the selector, it is also included in the returned list.

Ignored elements

The following elements are ignored, even if they match the selector:

  • Elements in a different layer than root.
  • Elements that are being destroyed with an animation.
  • Elements that are being removed by a transition.

To include all elements matching the selector, use up.element.subtree().


Parameters

root
required

The root element for the search.

selector
required

The CSS selector to match.

string

Return value

A list of all matching elements.