From ae835b9f6334db804f883bb5140bcfcf5d843d73 Mon Sep 17 00:00:00 2001 From: Sam Breed Date: Sun, 12 Jan 2014 19:44:30 -0700 Subject: [PATCH] explicitly pass the global scope to the SVG iffe Conflicts: src/svg.js --- src/svg.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/svg.js b/src/svg.js index fc8b038..d1680b5 100644 --- a/src/svg.js +++ b/src/svg.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -var Snap = (function() { +var Snap = (function(root) { Snap.version = "0.3.0"; /*\ * Snap @@ -55,8 +55,8 @@ Snap.toString = function () { }; Snap._ = {}; var glob = { - win: window, - doc: window.document + win: root.window, + doc: root.window.document }; Snap._.glob = glob; var has = "hasOwnProperty", @@ -1612,4 +1612,4 @@ Snap.plugin = function (f) { }; glob.win.Snap = Snap; return Snap; -}()); +}(window || this));