   <!DOCTYPE html><html><head>
     <script>
       window.FactlinkConfig = #{JSON.stringify(FactlinkConfig)};
-      window.parent.FACTLINK.iframeLoaded();
+      window.parent.FACTLINK_ON_IFRAME_LOAD();
     </script>
   </head><body></body></html>
 """


  coreScriptTag.onload = coreScriptTag.onreadystatechange = null

  proxy = (func) ->
    window.FACTLINK[func] = ->
      iframe.contentWindow.Factlink[func].apply iframe.contentWindow.Factlink, arguments

  proxy 'on'
  proxy 'off'
  proxy 'hideDimmer'
  proxy 'triggerClick'
  proxy 'stopAnnotating'
  proxy 'getSelectionInfo'

  jQuery?(window).trigger 'factlink.libraryLoaded'

#### Load iframe with script tag

window.FACTLINK = {}
window.FACTLINK.iframeLoaded = ->
  iframe.contentWindow.document.head.appendChild coreScriptTag

iframeDoc = iframe.contentWindow.document

return if window.FACTLINK_LOADED?
window.FACTLINK_LOADED = true

#### Create iframe

