src code

instance method Element#recursivelyCollect

Element#recursivelyCollect(property) → [Element…]

Recursively collects elements whose relationship to element is specified by property. property has to be a property (a method won't do!) of element that points to a single DOM node (e.g., nextSibling or parentNode).

This method can be called either as an instance method or as a generic method. If calling as a generic, pass the instance in as the first argument.