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: 
    // The source text retrieved during the previous update.
    String _sourceTextAtLastUpdate = null;
  }
  
  
  
negative.code:   void _onSourceTextChange(JsObject e, JsObject t) {
      _updateTimer.cancel();
      _updateTimer = new Timer(_UPDATE_DELAY, _update);
    }
  
    // Callback invoked when the user attempts to close this window / tab.
    void _onBeforeUnload(BeforeUnloadEvent e) {
      if (sourceText.trim() == _document.text.trim()) {
        return;
      }
  
      e.returnValue = _UNLOAD_CONFIRMATION_MESSAGE;
    }
  
    // Logger.
  