The code for this should be very brief. It's important to keep it simple. The model is implemented by the class, Page . To preserve the correct encapsulation, you should not access the DOM, except inside the Page class. Class Tree implements one view.
Tree is unaware of the meaning of what it displays.
It just accepts an array of strings and presents them in a tree structure. Its presentation is opaque to the program but the Tree view must synchronize with it. The controller is the Form. The controller manages the model and the view and their synchronization. In particular, it acts as a container for their screen real estate.