wgge 2.0.32 → 2.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/helper/DOMHelper.js +4 -2
- package/package.json +1 -1
package/core/helper/DOMHelper.js
CHANGED
|
@@ -71,7 +71,7 @@ export default class DOMHelper {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
static isFullscreen() {
|
|
74
|
-
return (
|
|
74
|
+
return (document.fullscreenElement !== null) || (window.innerWidth === screen.width && window.innerHeight === screen.height);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
static openFullscreen(elem) {
|
|
@@ -87,7 +87,9 @@ export default class DOMHelper {
|
|
|
87
87
|
|
|
88
88
|
static closeFullscreen() {
|
|
89
89
|
if (document.exitFullscreen) {
|
|
90
|
-
document.exitFullscreen()
|
|
90
|
+
document.exitFullscreen()
|
|
91
|
+
.then(() => console.log('Switched to fullscreen'))
|
|
92
|
+
.catch((e) => console.error('Fullscreen failed', e));
|
|
91
93
|
} else if (document.webkitExitFullscreen) { /* Safari */
|
|
92
94
|
document.webkitExitFullscreen();
|
|
93
95
|
} else if (document.msExitFullscreen) { /* IE11 */
|