Reply To: Safari Compatibility

PennController for IBEX Forums Support Safari Compatibility Reply To: Safari Compatibility

#5758
Ncomeau
Participant

Code that properly exits fullscreen for me (for some reason adding .documentElement breaks it):

newFunction( ()=> {
if (document.exitFullscreen)
document.exitFullscreen();
else if (document.mozCancelFullScreen) /* Firefox */
document.mozCancelFullScreen();
else if (document.webkitExitFullscreen) /* Chrome, Safari and Opera */
document.webkitExitFullscreen();
else if (document.msExitFullscreen) /* IE/Edge */
document.msExitFullscreen();
}).call()