aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.coffee
diff options
context:
space:
mode:
authormrmr19932017-10-25 16:45:45 +0100
committermrmr19932017-10-25 16:51:46 +0100
commitaca953e06a7cf5aa6906df677a8fb6ed3e688a03 (patch)
treef207a026e1e8e97b718aaec98f3e8f7b530af9cf /lib/utils.coffee
parent03569d64b445780576f960d0553dc763c807de95 (diff)
downloadvimium-aca953e06a7cf5aa6906df677a8fb6ed3e688a03.tar.bz2
FF: Share |root| global proxy, re-add the globals to window on DOMLoad
This is a workaround for Firefox bug 1408996.
Diffstat (limited to 'lib/utils.coffee')
-rw-r--r--lib/utils.coffee5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index d0a82cf7..b5b96844 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -335,8 +335,11 @@ class JobRunner
onReady: (callback) ->
@fetcher.use callback
-root = exports ? window
+root = exports ? (window.root ?= {})
root.Utils = Utils
root.SimpleCache = SimpleCache
root.AsyncDataFetcher = AsyncDataFetcher
root.JobRunner = JobRunner
+unless exports?
+ root.extend = extend
+ extend window, root