Randomblue Randomblue - 1 year ago 179
Javascript Question

Chrome Fullscreen API

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?

Answer Source

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

addEventListener("click", function() {
      el = document.documentElement
    , rfs =
        || el.webkitRequestFullScreen
        || el.mozRequestFullScreen