     rememberCurrentUrl()
     rememberCurrentState()
     rememberCurrentAssets()
+    createDocument = generateBrowserCompatibleDocumentParser()
     initialized = true
 
 recallScrollPosition = (page) ->

    testDoc = createDocumentUsingParser '<html><body><p>test'

  if testDoc?.body?.childNodes.length is 1
    createDocumentUsingParser html
  else
    createDocumentUsingWrite html


installClickHandlerLast = (event) ->

  title = doc.querySelector 'title'
  [ title?.textContent, doc.body ]

createDocument = null

generateBrowserCompatibleDocumentParser = ->
  createDocumentUsingParser = (html) ->
    (new DOMParser).parseFromString html, 'text/html'

