screenfull
Advanced tools
Comparing version 4.2.0 to 4.2.1
/*! | ||
* screenfull | ||
* v4.2.0 - 2019-04-01 | ||
* v4.2.1 - 2019-07-27 | ||
* (c) Sindre Sorhus; MIT License | ||
@@ -87,3 +87,3 @@ */ | ||
request: function (elem) { | ||
return new Promise(function (resolve) { | ||
return new Promise(function (resolve, reject) { | ||
var request = fn.requestFullscreen; | ||
@@ -96,4 +96,8 @@ | ||
this.on('change', onFullScreenEntered); | ||
elem = elem || document.documentElement; | ||
var promise; | ||
// Work around Safari 5.1 bug: reports support for | ||
@@ -104,8 +108,8 @@ // keyboard in fullscreen even though it doesn't. | ||
if (/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)) { | ||
elem[request](); | ||
promise = elem[request](); | ||
} else { | ||
elem[request](keyboardAllowed ? Element.ALLOW_KEYBOARD_INPUT : {}); | ||
promise = elem[request](keyboardAllowed ? Element.ALLOW_KEYBOARD_INPUT : {}); | ||
} | ||
this.on('change', onFullScreenEntered); | ||
Promise.resolve(promise).catch(reject); | ||
}.bind(this)); | ||
@@ -112,0 +116,0 @@ }, |
{ | ||
"name": "screenfull", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "Simple wrapper for cross-browser usage of the JavaScript Fullscreen API, which lets you bring the page or any element into fullscreen.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -73,3 +73,5 @@ # screenfull.js | ||
iPhone is not supported. | ||
## Documentation | ||
@@ -282,6 +284,1 @@ | ||
- [Building an amazing fullscreen mobile experience](http://www.html5rocks.com/en/mobile/fullscreen/) | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
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
17423
304
283