diff options
author | snydesc <scottsnyder@snysco.com> | 2016-05-25 09:52:52 -0400 |
---|---|---|
committer | snydesc <scottsnyder@snysco.com> | 2016-05-25 09:52:52 -0400 |
commit | 5d63a0eb2ae6881c44d41b8a7d06f30d5a4ae6a3 (patch) | |
tree | b343d438c82048776d1df118fac1c87f79233c22 /src | |
parent | 38513f09aed2578843aee1d975416fdddfd5f2e8 (diff) | |
download | svg.js-5d63a0eb2ae6881c44d41b8a7d06f30d5a4ae6a3.tar.gz svg.js-5d63a0eb2ae6881c44d41b8a7d06f30d5a4ae6a3.zip |
Changed to document.documentElement.contains
document.contains will not work in IE.
document.body.contains will work in IE, Chrome, and Firefox however will not work on SVG only documents.
document.documentElement.contains appears to work for all variations.
Diffstat (limited to 'src')
-rw-r--r-- | src/boxes.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boxes.js b/src/boxes.js index 36dcb1d..1e9d0eb 100644 --- a/src/boxes.js +++ b/src/boxes.js @@ -9,7 +9,7 @@ SVG.BBox = SVG.invent({ try { // the element is NOT in the dom, throw error - if(!document.body.contains(element.node)) throw new Exception('Element not in the dom') + if(!document.documentElement.contains(element.node)) throw new Exception('Element not in the dom') // find native bbox box = element.node.getBBox() |