fullscreen
Syntax
fullscreen: [selector|body|close] [hide|show|auto] [after (time)];
This is the command to use to make the page fullscreen. You can either make the whole page fullscreen, or put a element and its contents into fullscreen mode. This is a request for fullscreen rather than being definite, and its result depends on browser support, device oddities and the state of the page.
selector = A selector pointing to an element to make fullscreen. If no selector is chosen, the target selector will attempt to go into fullscreen mode.
body = Puts the whole page into fullscreen mode.
close = Exits out of fullscreen.
hide, show or auto = Optional parameters (not widely supported in browsers at this time). These correspond to the navigationUI options available on the JavaScript Fullscreen API. They can be used, but browser support is highly variant. Documentation that explains what those options are supposed to do can be found here: https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen.
When fullscreen is activated, the fullscreenEnter event gets fired.
When fullscreen is closed, the fullscreenExit event gets fired.
The examples below cover fullscreen and its events for both "body" and a selector.
Important note: Different devices handle fullscreen mode in different ways, so always test before deploying. There is no guarantee that the fullscreen command will behave as expected, simply because some devices don't respond to fullscreen instructions as you would expect. For general websites running on desktops though, this should work. But there doesn't appear to be an agreed-upon cross-device standard in place yet.