The key words here are "built-in". JQuery seems to have an abundance of third party widgets. So it was very easy to find a Jquery tree view i.e.
Third party is not attractive as core in terms of support, but I would not bet the farm on Yahoo support for YUI for the lifetiime of the Moodle project.
To cut a tedious story short. I did it in JQuery.