Grow your CSS skills. Land your dream job.

JavaScript Fullscreen API

  • # June 6, 2012 at 9:02 am

    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)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".