I need to know which (DOM) events are fired when a user enter the fullscreen mode via the new Fullscreen API. I tried for example this snippet but it doesn't fire:
jQuery('body').on('fullScreenChange', function() { alert("Fired!"); });
I need to know which (DOM) events are fired when a user enter the fullscreen mode via the new Fullscreen API. I tried for example this snippet but it doesn't fire:
jQuery('body').on('fullScreenChange', function() { alert("Fired!"); });
I was using:
It fires for Safari, Chrome, and Firefox (haven't tested others). There seems to be a subtle difference in the resulting context between webkit and moz, element height and width are different. But the events fire, which is your question.
Oh. And watch out for using
alert('fs')
with full screen testing. It often interferes with the screen change.Your link shows the answer...
There is no fullscreenChange event in native jQuery. But there are several third-party plugins which provide you access to the event:
As you can see on their code there is no clean API access to this type of event.