Could you let us in on how to go about implementing such an interface? You don't have to go into specifics but if you used any tools or frameworks that you found invaluable etc, it would be nice to know.
Object orientation is your friend with these kinds of tools. We based a bit of the internal component model off of Java's AWT and Swing, making sure that each component we built was reusable in any situation, making it extremely easy to add new components.
Just like in the DOM, you are performing operations on a tree structure, so recursion and iterative optimization is important (especially in Javascript where function calls are expensive).
Other than that, it's just a lot of event handling and DOM manipulation.