     window.FACTLINK[name] = ->
       if jslib_jail_iframe.contentWindow.Factlink?
         jslib_jail_iframe.contentWindow.Factlink[name](arguments...)
-        return # don't return the value, as we also don't do that when storing calls
       else
         storedMethodCalls.push {name: name, arguments: arguments}
-        return
+      return # don't return the value, as we can't do that when storing calls
 
   proxy_method 'on'
   proxy_method 'triggerClick'


  window.FACTLINK_ON_CORE_LOAD = ->
    # This seems to be necessary, don't understand entirely why
    window.FACTLINK.easyXDM = jslib_jail_iframe.contentWindow.Factlink.easyXDM

    for methodCall in storedMethodCalls
      jslib_jail_iframe.contentWindow.Factlink[methodCall.name](methodCall.arguments...)
    storedMethodCalls = []

  #### Load iframe with script tag
  jslib_jail_doc = jslib_jail_iframe.contentWindow.document



  script_tag = jslib_jail_doc.createElement 'script'
  script_tag.appendChild(
    jslib_jail_doc.createTextNode(
      "#{jslib_jail_code};window.parent.FACTLINK_ON_CORE_LOAD();"))
  jslib_jail_doc.documentElement.appendChild(script_tag)


jslib_jail_code = __INLINE_JS_PLACEHOLDER__
style_code = __INLINE_CSS_PLACEHOLDER__
