screenfull
Advanced tools
Comparing version 1.1.0 to 1.1.1
/*! | ||
* screenfull | ||
* v1.1.0 - 2013-09-06 | ||
* v1.1.1 - 2013-11-20 | ||
* https://github.com/sindresorhus/screenfull.js | ||
@@ -57,4 +57,4 @@ * (c) Sindre Sorhus; MIT License | ||
'msFullscreenEnabled', | ||
'MSFullscreenchange', | ||
'MSFullscreenerror' | ||
'MSFullscreenChange', | ||
'MSFullscreenError' | ||
] | ||
@@ -61,0 +61,0 @@ ]; |
{ | ||
"name": "screenfull", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Browser module - Simple wrapper for cross-browser usage of the JavaScript Fullscreen API, which lets you bring the page or any element into fullscreen.", | ||
@@ -24,5 +24,5 @@ "keywords": [ | ||
"grunt-contrib-concat": "~0.3.0", | ||
"grunt-contrib-jshint": "~0.6.4", | ||
"grunt-contrib-jshint": "~0.7.2", | ||
"grunt-contrib-uglify": "~0.2.4", | ||
"load-grunt-tasks": "~0.1.0" | ||
"load-grunt-tasks": "~0.2.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "engines": { |
# screenfull.js | ||
[![Views in the last 24 hours](https://sourcegraph.com/api/repos/github.com/sindresorhus/screenfull.js/counters/views-24h.png)](https://sourcegraph.com/github.com/sindresorhus/screenfull.js) | ||
Simple wrapper for cross-browser usage of the JavaScript [Fullscreen API](https://developer.mozilla.org/en/DOM/Using_full-screen_mode), which lets you bring the page or any element into fullscreen. Smoothens out the browser implementation differences, so you don't have too. | ||
@@ -30,3 +32,7 @@ | ||
#### [cdnjs](http://cdnjs.com) | ||
`//cdnjs.cloudflare.com/ajax/libs/screenfull.js/1.0.4/screenfull.min.js` | ||
## Why? | ||
@@ -131,5 +137,5 @@ | ||
if (screenfull.enabled) { | ||
screenfull.onchange = function () { | ||
document.addEventListener(screenfull.raw.fullscreenchange, function () { | ||
console.log('Am I fullscreen? ' + (screenfull.isFullscreen ? 'Yes' : 'No')); | ||
}; | ||
}); | ||
} | ||
@@ -165,9 +171,21 @@ ``` | ||
Override this method to get notified about fullscreen changes. | ||
<del>Override this method to get notified about fullscreen changes.</del> | ||
You should rather use a real event listener: | ||
```js | ||
document.addEventListener(screenfull.raw.fullscreenchange, function () {}); | ||
``` | ||
#### .onerror() | ||
Override this method to get notified about fullscreen errors. | ||
<del>Override this method to get notified about fullscreen errors.</del> | ||
You should rather use a real event listener: | ||
```js | ||
document.addEventListener(screenfull.raw.fullscreenerror, function () {}); | ||
``` | ||
### Properties | ||
@@ -203,2 +221,3 @@ | ||
- [W3C Fullscren spec](http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html) | ||
- [Building an amazing fullscreen mobile experience](http://www.html5rocks.com/en/mobile/fullscreen/) | ||
@@ -205,0 +224,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9630
224