diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-03-18 13:07:00 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2017-03-18 13:13:54 +0100 |
commit | c482c602500494c8f30357284fd873046296ab65 (patch) | |
tree | ab63ed28993257cef93c03a6957722650f3609b5 /dist/svg.js | |
parent | b9bf23473e782ef16ae0d51dc840051451a3fc03 (diff) | |
download | svg.js-c482c602500494c8f30357284fd873046296ab65.tar.gz svg.js-c482c602500494c8f30357284fd873046296ab65.zip |
prefix globals with window so window can be injected properly
Diffstat (limited to 'dist/svg.js')
-rw-r--r-- | dist/svg.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dist/svg.js b/dist/svg.js index d9e927a..9ed3d36 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -6,7 +6,7 @@ * @copyright Wout Fierens <wout@mick-wout.com> * @license MIT * -* BUILT: Thu Mar 16 2017 13:14:11 GMT+0100 (Mitteleuropäische Zeit) +* BUILT: Sat Mar 18 2017 13:11:58 GMT+0100 (Mitteleuropäische Zeit) */; (function(root, factory) { if (typeof define === 'function' && define.amd) { @@ -123,7 +123,7 @@ SVG.adopt = function(node) { // adopt with element-specific settings if (node.nodeName == 'svg') - element = node.parentNode instanceof SVGElement ? new SVG.Nested : new SVG.Doc + element = node.parentNode instanceof window.SVGElement ? new SVG.Nested : new SVG.Doc else if (node.nodeName == 'linearGradient') element = new SVG.Gradient('linear') else if (node.nodeName == 'radialGradient') @@ -272,7 +272,7 @@ SVG.utils = { } , filterSVGElements: function(nodes) { - return this.filter( nodes, function(el) { return el instanceof SVGElement }) + return this.filter( nodes, function(el) { return el instanceof window.SVGElement }) } } @@ -1186,7 +1186,7 @@ SVG.Element = SVG.invent({ if(!type) return parent // loop trough ancestors if type is given - while(parent && parent.node instanceof SVGElement){ + while(parent && parent.node instanceof window.SVGElement){ if(typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent parent = SVG.adopt(parent.node.parentNode) } @@ -3458,10 +3458,10 @@ SVG.extend(SVG.Element, { , fire: function(event, data) { // Dispatch event - if(event instanceof Event){ + if(event instanceof window.Event){ this.node.dispatchEvent(event) }else{ - this.node.dispatchEvent(event = new CustomEvent(event, {detail:data, cancelable: true})) + this.node.dispatchEvent(event = new window.CustomEvent(event, {detail:data, cancelable: true})) } this._event = event @@ -5389,7 +5389,7 @@ function arrayToString(a) { function assignNewId(node) { // do the same for SVG child nodes as well for (var i = node.childNodes.length - 1; i >= 0; i--) - if (node.childNodes[i] instanceof SVGElement) + if (node.childNodes[i] instanceof window.SVGElement) assignNewId(node.childNodes[i]) return SVG.adopt(node).id(SVG.eid(node.nodeName)) |