YUI3 does not have TreeView in core but has a number of TreeView widgets in Gallery.
gallery-sm-treeview is the best amongst the available TreeView widgets.
gallery-sm-treeview is "crazy fast" and memory efficient when compared to others available.
Default skin of gallery-sm-treeview includes high-res icons that look fantastic on retina displays and other high-dpi devices.
gallery-sm-treeview cannot be used directly to render the tree from HTML markup.
The patch should include a function that converts HTML markup to object that can be fed to gallery-sm-treeview.