           window.FACTLINK[name] = ->
             jslib_jail_iframe.contentWindow.FactlinkJailRoot[name](arguments...)
             return
+
+      root.perf.add_timing_event 'core_loaded'
 
       for methodCall in storedMethodCalls
         window.FACTLINK[methodCall.name](methodCall.arguments...)


    document.body.appendChild outerWrapperEl


    jail_window = jslib_jail_iframe.contentWindow
    jail_window.FactlinkConfig = window.FactlinkConfig

    script_tag.appendChild(jslib_jail_doc.createTextNode(jslib_jail_code))
    jslib_jail_doc.documentElement.appendChild(script_tag)

    root = jslib_jail_iframe.contentWindow.FactlinkJailRoot
    root.perf.add_existing_timing_event 'factlink_loader_start', factlink_loader_start_timestamp
    root.perf.add_existing_timing_event 'before_jail', load_time_before_jail
    root.perf.add_timing_event 'after_jail'
    console.log('has body: '+!!document.body)

    root.loaded_promise.done ->
      #called from jail-iframe when core iframe is ready.
      for name in methods
        do (name) ->
