aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dom_utils.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dom_utils.coffee')
-rw-r--r--lib/dom_utils.coffee4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index 014a1f50..eb11e295 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -322,5 +322,9 @@ DomUtils =
getContainingElement: (element) ->
element.getDestinationInsertionPoints()[0] or element.parentElement
+ # This tests whether a window is too small to be useful.
+ windowIsTooSmall: ->
+ return window.innerWidth < 3 or window.innerHeight < 3
+
root = exports ? window
root.DomUtils = DomUtils