yui/yui3 — pull request #565 by rgrove (2013-03-28 23:34:21+00:00)
Title: Tree: Add traverseNode() and findNode() methods

…along with matching `traverse()` and `find()` wrapper methods on Tree.Node.

`traverseNode()` passes the specified node and each of its descendants to a callback function in depth-first order. Traversal can be stopped by returning `Tree.STOP_TRAVERSAL` from the callback.

`findNode()` passes the specified node and each of its descendants to a callback function and returns the first node for which the callback returns a truthy value.