aboutsummaryrefslogtreecommitdiffstats
path: root/src/elements/Image.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-12 09:35:37 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-12 09:35:37 +0100
commitd3f8d83551799db061a558537bc89dcbfd522c21 (patch)
treef6456de7ac3599c35b217c9f769cb1adca03997f /src/elements/Image.js
parentbf7703f5915c6154937f3febf812aad6483bff45 (diff)
downloadsvg.js-d3f8d83551799db061a558537bc89dcbfd522c21.tar.gz
svg.js-d3f8d83551799db061a558537bc89dcbfd522c21.zip
evaluate window and document on access and not on import
Diffstat (limited to 'src/elements/Image.js')
-rw-r--r--src/elements/Image.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/elements/Image.js b/src/elements/Image.js
index 6a01b8f..7f00980 100644
--- a/src/elements/Image.js
+++ b/src/elements/Image.js
@@ -6,9 +6,7 @@ import { registerMethods } from '../utils/methods.js'
import { xlink } from '../modules/core/namespaces.js'
import Pattern from './Pattern.js'
import Shape from './Shape.js'
-import globals from '../utils/window.js'
-
-const { window } = globals
+import { globals } from '../utils/window.js'
export default class Image extends Shape {
constructor (node) {
@@ -19,7 +17,7 @@ export default class Image extends Shape {
load (url, callback) {
if (!url) return this
- var img = new window.Image()
+ var img = new globals.window.Image()
on(img, 'load', function (e) {
var p = this.parent(Pattern)