       addEventListener("DOMContentLoaded", @pageLoaded, false)
       @history.start()
       @started = true
+      @enabled = true
+
+  disable: ->
+    @enabled = false
 
   stop: ->
     if @started


  loadErrorResponse: (response) ->
    @view.loadDocumentHTML(response)
    @controller.stop()

  startVisitToLocationWithAction: (location, action) ->
    @startVisit(location, action)

  # History delegate

  historyPoppedToLocation: (location) ->
    if @enabled
      @startVisit(location, "restore", true)
      @location = location
    else
      @adapter.pageInvalidated()

  # Event handlers

