summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Isager <kasperisager@gmail.com>2016-01-12 22:36:38 +0100
committerKasper Isager <kasperisager@gmail.com>2016-01-12 22:36:38 +0100
commit2686bd5648dea99520c5d038f3b42d22bc5a1121 (patch)
treeddebbfaeb2416ce8eb242acf186e5ad3adf929a3
parentf5178deb853c34a99b15dee456ef9f9699c4c7de (diff)
downloadfastdom-2686bd5648dea99520c5d038f3b42d22bc5a1121.zip
fastdom-2686bd5648dea99520c5d038f3b42d22bc5a1121.tar.gz
fastdom-2686bd5648dea99520c5d038f3b42d22bc5a1121.tar.bz2
Bind to whichever global context is available
This lets fastdom be used in environments where no `window` global is available. My own use-case is integration testing modules that rely on fastdom in node using jsdom.
-rw-r--r--fastdom.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/fastdom.js b/fastdom.js
index dff794b..8579b62 100644
--- a/fastdom.js
+++ b/fastdom.js
@@ -239,4 +239,4 @@ var exports = win.fastdom = (win.fastdom || new FastDom()); // jshint ignore:lin
if ((typeof define)[0] == 'f') define(function() { return exports; });
else if ((typeof module)[0] == 'o') module.exports = exports;
-})(window);
+})(this);