anchor.diff:      builder.allowNavigation(new _AllowAllUriPolicy());
       builder.allowImages(new _AllowAllUriPolicy());
       _outputNodeValidator = builder;
  +
  +    // Set up onload confirmation dialog.
  +    window.onBeforeUnload.listen(_onBeforeUnload);
     }
   
     // Loads a document into the editor view.
  
positive.code:   void _onSourceTextChange(JsObject e, JsObject t) {
      _updateTimer.cancel();
      _updateTimer = new Timer(_UPDATE_DELAY, _update);
    }
  
    // Logger.
  
negative.code: 
    // The source text retrieved during the previous update.
    String _sourceTextAtLastUpdate = null;
  
    // Message displayed if the user has modified the document.
    static final String _UNLOAD_CONFIRMATION_MESSAGE = '''
  If you leave this page, all data you have entered on this page will be lost.
  
  Please make sure to save any data you would like to keep by copying it from this
  page and saving it on your computer.
  ''';
  }
  
  
  