Modern desktop version of IE 10 is always fullscreen.
There is a living specification for :fullscreen pseudo-class on W3
But when I tried to det
Reading MDN Web docs, I like this native method.
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/fullscreenElement
function is_fullscreen(){
return document.fullscreenElement != null;
}
or fancier
let is_fullscreen = () => !! document.fullscreenElement
This method also works when you open developer tools in browser. Because fullscreen is applied to a particular element, null means none of it is in fullscreen.
You can even extend to check a particular element eg:
function is_fullscreen(element=null){
return element != null? document.fullscreenElement == element:document.fullscreenElement != null;
}
Which only return true if currently is fullscreen and (element is null or element is the fullscreened element)