webkitfullscreenchange event for iFrame

/* works on all elements except iframes */
document.addEventListener("webkitfullscreenchange", function() {
   alert("hello world");
}, false); 

/* never triggers even when iFrame enters full screen */
myIframe.addEventListener("webkitfullscreenchange", function() {
   alert("hello iframe");
}, false);

I am not able to get event listener webkitfullscreenchange event to trigger for iframes. iFrame is under the same origin. Does anyone know how to get this work? Thanks.

Answers


If someone ask for the same issue, allowfullscreen=true on iframe must be setted

(https://wiki.mozilla.org/Gecko:FullScreenAPI#fullscreenchange_event)


Need Your Help

SpriteKit - Rotate sprite towards point

objective-c sprite-kit sprite

I am working on a game where a bunch of enemies spawn outside the screen and move towards the center (where there's a space station). However, I need the spaceships to face in the direction of the

Devise update user password without password_confirmation

ruby-on-rails authentication devise

I want to update users password without password_confirmation in devise. In case password field is blank - password don't change. How could I do this with devise?