Friday, May 17, 2024
1
rated 0 times [  3] [ 2]  / answers: 1 / hits: 109374  / 13 Years ago, thu, october 20, 2011, 12:00:00

According to this article Google Chrome 15 has a fullscreen JavaScript API.



I have tried to make it work but failed. I have also searched for official documentation in vain.



What does the fullscreen JavaScript API look like?


More From » google-chrome

 Answers
46

The API only works during user interaction, so it cannot be used maliciously. Try the following code:



addEventListener(click, function() {
var el = document.documentElement,
rfs = el.requestFullscreen
|| el.webkitRequestFullScreen
|| el.mozRequestFullScreen
|| el.msRequestFullscreen
;

rfs.call(el);
});

[#89515] Tuesday, October 18, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
chyanne

Total Points: 208
Total Questions: 120
Total Answers: 110

Location: Colombia
Member since Mon, May 2, 2022
2 Years ago
;