HTML and CSS Reference
Listing 3.4. app.js-Application initialization code
Step 5: Enable navigation between views, manage the state of docu- uments being edited
With the code to initialize the application out of the way, let's add code to keep track of
whether the user has made changes to a document and to switch between the File Browser
and File Editor views. The code in the next listing should be added inside the SuperEd-
itor constructor function that you created in the previous listing.
Listing 3.5. app.js—View navigation and state management code