aboutsummaryrefslogtreecommitdiffstats
path: root/src/types/Box.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/types/Box.js')
-rw-r--r--src/types/Box.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/types/Box.js b/src/types/Box.js
index 8cbda30..90979d2 100644
--- a/src/types/Box.js
+++ b/src/types/Box.js
@@ -7,17 +7,18 @@ import Point from './Point.js'
import parser from '../modules/core/parser.js'
function isNulledBox (box) {
- return !box.w && !box.h && !box.x && !box.y
+ return !box.width && !box.height && !box.x && !box.y
}
function domContains (node) {
- return (globals.document.documentElement.contains || function (node) {
- // This is IE - it does not support contains() for top-level SVGs
- while (node.parentNode) {
- node = node.parentNode
- }
- return node === document
- }).call(globals.document.documentElement, node)
+ return node === globals.document
+ || (globals.document.documentElement.contains || function (node) {
+ // This is IE - it does not support contains() for top-level SVGs
+ while (node.parentNode) {
+ node = node.parentNode
+ }
+ return node === globals.document
+ }).call(globals.document.documentElement, node)
}
export default class Box {