Detect user switched to fullscreen

62 Views Asked by At

When my web page is requesting a full screen access using requestFullscreen from Fullscreen API, it can install a fullscreenchange event handler to be notified of going in / out of fullscreen. However this handler does not seem to be notified when user goes to fullscreen on his own (like pressing F11 in Chrome).

Is there a way how to be notified of this? My motivation is I would like to lock a pointer using Pointer Lock API once user presses F11 or uses the browser menu to switch to fullscreen.

0

There are 0 best solutions below