Use prefixed document.fullscreen if necessary
This commit is contained in:
parent
24e4906559
commit
d2dadb41c7
@ -30,8 +30,9 @@ export function toggleFullscreen(arn: AnimeNotifier, button: HTMLElement) {
|
|||||||
let element = document.getElementById(elementId)
|
let element = document.getElementById(elementId)
|
||||||
let requestFullscreen = element.requestFullscreen || element["mozRequestFullScreen"] || element["webkitRequestFullScreen"] || element["msRequestFullscreen"]
|
let requestFullscreen = element.requestFullscreen || element["mozRequestFullScreen"] || element["webkitRequestFullScreen"] || element["msRequestFullscreen"]
|
||||||
let exitFullscreen = document.exitFullscreen || document["mozCancelFullScreen"] || document["webkitExitFullscreen"] || document["msExitFullscreen"]
|
let exitFullscreen = document.exitFullscreen || document["mozCancelFullScreen"] || document["webkitExitFullscreen"] || document["msExitFullscreen"]
|
||||||
|
let fullscreen = document.fullscreen || document["webkitIsFullScreen"] || document["mozFullScreen"]
|
||||||
|
|
||||||
if(document.fullscreen) {
|
if(fullscreen) {
|
||||||
exitFullscreen.call(document)
|
exitFullscreen.call(document)
|
||||||
} else {
|
} else {
|
||||||
requestFullscreen.call(element)
|
requestFullscreen.call(element)
|
||||||
|
Loading…
Reference in New Issue
Block a user