Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JavaScript Fullscreen API

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #38377
    dynamyc
    Member

    I’ve found a plugin called screenfull.js and I’m wondering if it’s possible to automatically open the page in fullscreen without clicking on a button.
    This is an example of code for making the page fullscreen :

    document.getElementById('#button').addEventListener('click', function() {
    if ( screenfull ) {
    screenfull.request();
    } else {
    // Ignore or do something else
    }
    });

    Thanks!

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.