Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
JavaScript
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib/gulp/karma
.gitignore
.jshintrc
.npmignore
.travis.yml
LICENSE
README.md
fullscreen.js
fullscreen.min.js
fullscreen.spec.js
gulpfile.js
karma.conf.js
package.json

README.md

Fullscreen.js

Build Status devDependency Status

Fullscreen.js is a simple wrapper for using Fullscreen API in browsers.

This allows one to work around the various vendor-prefixed implementations of the API, and provides some convenience routines for listening for ctrl+f or cmd+f to toggle fullscreen mode.

More useful features may be added if they seem useful --- contributions are more than welcome.

(This was initially written as a helper for my Web Unleashed 2014 slide deck as a way to switch the presentation to fullscreen mode... I'm sure it has other uses, so send me a pull request if you want/need something from it!)

Usage

Method Arguments Description
$fullscreen.listen() Start listening for ctrl+f or cmd+f in order to toggle fullscreen mode --- listens on document.
$fullscreen.deafen() Stop listening for key events
$fullscreen.enter()
  1. node (optional)
  2. flags (optional)
Request fullscreen mode for a given element (or the document element if omitted), optionally with flags
$fullscreen.exit() Exits (cancels) fullscreen mode for the current fullscreen element, if any
$fullscreen.toggle() Exits (cancels) fullscreen mode if there is a current fullscreen element, or requests fullscreen mode if there isn't.

License

(c) 2014 Caitlin Potter & Contributors

Fullscreen.js is MIT-licensed. See LICENSE for details.

Something went wrong with that request. Please try again.