From 03e010f0aeb835778664438549f168ccae297d7c Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 2 Apr 2016 08:48:00 +0100 Subject: Move the test for small windows to DomUtils. The reason for doing this is that we will be using the same test to decide whether or not to register a frame. --- lib/dom_utils.coffee | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3