aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/boxes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boxes.js b/src/boxes.js
index 2b14abd..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.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()