@symbo.ls/utils
Advanced tools
Comparing version 2.11.420 to 2.11.421
@@ -27,5 +27,5 @@ "use strict"; | ||
var toggleFullscreen = async (el) => { | ||
if (!document.fullscreenElement && el.node) { | ||
if (!document.fullscreenElement) { | ||
try { | ||
await el.node.requestFullscreen(); | ||
await (el.node || document).requestFullscreen(); | ||
} catch (err) { | ||
@@ -32,0 +32,0 @@ console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`); |
@@ -1547,5 +1547,5 @@ "use strict"; | ||
var toggleFullscreen = async (el) => { | ||
if (!document.fullscreenElement && el.node) { | ||
if (!document.fullscreenElement) { | ||
try { | ||
await el.node.requestFullscreen(); | ||
await (el.node || document).requestFullscreen(); | ||
} catch (err) { | ||
@@ -1552,0 +1552,0 @@ console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`); |
{ | ||
"name": "@symbo.ls/utils", | ||
"version": "2.11.420", | ||
"version": "2.11.421", | ||
"author": "symbo.ls", | ||
@@ -29,3 +29,3 @@ "files": [ | ||
}, | ||
"gitHead": "115d994931e8dae83701a8a98f2722e1a59ae4a2" | ||
"gitHead": "c8c0374c888db13ddd96d6602f441ab80f13c203" | ||
} |
'use strict' | ||
export const toggleFullscreen = async (el) => { | ||
if (!document.fullscreenElement && el.node) { | ||
if (!document.fullscreenElement) { | ||
try { | ||
await el.node.requestFullscreen() | ||
await (el.node || document).requestFullscreen() | ||
} catch (err) { | ||
@@ -8,0 +8,0 @@ console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`) |
194370