From aacee479770a8cdb77dc158609961434ad258995 Mon Sep 17 00:00:00 2001 From: FUJI Goro Date: Sun, 16 Apr 2017 16:40:19 +0900 Subject: [PATCH] Allow screenfull to work in non-browser JS environments (#99) --- src/screenfull.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/screenfull.js b/src/screenfull.js index 250f62d..79d22c8 100644 --- a/src/screenfull.js +++ b/src/screenfull.js @@ -1,6 +1,7 @@ (function () { 'use strict'; + var document = typeof window !== 'undefined' ? window.document : {}; var isCommonjs = typeof module !== 'undefined' && module.exports; var keyboardAllowed = typeof Element !== 'undefined' && 'ALLOW_KEYBOARD_INPUT' in Element;