     return
   window.FACTLINK_LOADED = true
 
+  # Add styles
+  style_tag = (mkEl 'style') null, document.createTextNode(style_code)
+  document.getElementsByTagName('head')[0].appendChild style_tag
+
   #### Create iframe so jslib's namespace (window) doesn't collide with any content window.
-  jslib_jail_iframe = document.createElement('iframe')
+  jslib_jail_iframe = (mkEl 'iframe') 'factlink-iframe'
   jslib_jail_iframe.style.display = 'block'
   jslib_jail_iframe.style.border = '0px solid transparent'
-  jslib_jail_iframe.id = 'factlink-iframe'
 
   # Wrappers for increased CSS specificity
   outerWrapperEl =
-    mkDiv 'fl-wrapper-1',
-      mkDiv 'fl-wrapper-2',
-        mkDiv 'fl-wrapper-3',
-          mkDiv 'fl', jslib_jail_iframe
-
-  # Keep in sync with #fl-wrapper-1 in basic.less
-  outerWrapperEl.style.visibility = 'hidden'; # Prevent showing stuff when css is not loaded yet
-  outerWrapperEl.style.position = 'absolute'; # Prevent reflowing of the page
+    mkEl 'div', 'fl-wrapper-1',
+      mkEl 'div', 'fl-wrapper-2',
+        mkEl 'div', 'fl-wrapper-3',
+          mkEl 'div', 'fl', jslib_jail_iframe
 
   document.body.appendChild outerWrapperEl
 

    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

  proxy_method 'on'
  proxy_method 'triggerClick'


  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__
