Replace document.fullscreen for fullscreenElement

This feature is no longer recommended. Though some browsers might still support it,
it may have already been removed from the relevant web standards, may be in the
process of being dropped, or may only be kept for compatibility purposes.
Avoid using it, and update existing code if possible; see the compatibility table
at the bottom of this page to guide your decision.
Be aware that this feature may cease to work at any time.

More info in https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreen#Deprecated
This commit is contained in:
Jesús
2020-12-16 21:52:34 -05:00
parent 3fa5a55f57
commit 1a0a303320

View File

@@ -26,7 +26,7 @@ function onKeyDown(e) {
} }
else if (c == "f") { else if (c == "f") {
e.preventDefault(); e.preventDefault();
if (document.fullscreen) document.exitFullscreen(); if (document.fullscreenElement) document.exitFullscreen();
else v.requestFullscreen(); else v.requestFullscreen();
} }
else if (c == "m") { else if (c == "m") {