Hi
Chrome only allows fullscreen by "user interaction", ie a mouseclick.
This works:
addEventListener("click", function() {
var el = document.documentElement,
rfs = el.webkitRequestFullScreen;
rfs.call(el);
});
But the following does not. Console reports "Failed to execute 'requestFullScreen' on 'Element': API can only be initiated by a user gesture."
addEventListener("mouseenter", function() {
var el = document.documentElement,
rfs = el.webkitRequestFullScreen;
rfs.call(el);
});
Any workaround to get fullscreen on mouseenter?
This attempt gives same error:
addEventListener("click", function() {
var el = document.documentElement,
rfs = el.webkitRequestFullScreen;
rfs.call(el);
});
document.body.click();
thx!
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.