   else if doc.addEventListener
     doc.removeEventListener DOMContentLoadedString, domDidLoad, false
     ready = 1
-
   if ready and not domLoaded_
     domLoaded_ = true
-    internalReadyCallback_()  if internalReadyCallback_
+    loadApplication() if shouldLoadApplication() or forceAppLoading_
 
 bindReady = ->
   if doc.addEventListener

AppNotLoaded = 0
LoadingApp = 1
AppLoaded = 2
loadApp = null
readyObservers_ = []
preparesObservers_ = []
appLoadingStatus_ = AppNotLoaded
internalReadyCallback_ = null
domLoaded_ = false
prepareCalls_ = []
forceLoadApp_ = false


isFunction = (arg) ->
  typeof arg is "function"

    try
      toplevel = not _window.frameElement?
    doScrollCheck()  if doc.docElement and doc.docElement.doScroll and toplevel

doScrollCheck = ->
  unless domLoaded_
    try
