Merge pull request #2162 from miketaylr/fullscreen-squashed
Fullscreen updates for latest (unprefixed) spec.
This commit is contained in:
commit
6f325ca7e2
@ -383,7 +383,7 @@ var PDFView = {
|
|||||||
|
|
||||||
get supportsFullscreen() {
|
get supportsFullscreen() {
|
||||||
var doc = document.documentElement;
|
var doc = document.documentElement;
|
||||||
var support = doc.requestFullScreen || doc.mozRequestFullScreen ||
|
var support = doc.requestFullscreen || doc.mozRequestFullScreen ||
|
||||||
doc.webkitRequestFullScreen;
|
doc.webkitRequestFullScreen;
|
||||||
Object.defineProperty(this, 'supportsFullScreen', { value: support,
|
Object.defineProperty(this, 'supportsFullScreen', { value: support,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
@ -1155,7 +1155,7 @@ var PDFView = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
fullscreen: function pdfViewFullscreen() {
|
fullscreen: function pdfViewFullscreen() {
|
||||||
var isFullscreen = document.fullscreen || document.mozFullScreen ||
|
var isFullscreen = document.fullscreenElement || document.mozFullScreen ||
|
||||||
document.webkitIsFullScreen;
|
document.webkitIsFullScreen;
|
||||||
|
|
||||||
if (isFullscreen) {
|
if (isFullscreen) {
|
||||||
@ -1163,8 +1163,8 @@ var PDFView = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var wrapper = document.getElementById('viewerContainer');
|
var wrapper = document.getElementById('viewerContainer');
|
||||||
if (document.documentElement.requestFullScreen) {
|
if (document.documentElement.requestFullscreen) {
|
||||||
wrapper.requestFullScreen();
|
wrapper.requestFullscreen();
|
||||||
} else if (document.documentElement.mozRequestFullScreen) {
|
} else if (document.documentElement.mozRequestFullScreen) {
|
||||||
wrapper.mozRequestFullScreen();
|
wrapper.mozRequestFullScreen();
|
||||||
} else if (document.documentElement.webkitRequestFullScreen) {
|
} else if (document.documentElement.webkitRequestFullScreen) {
|
||||||
@ -2368,7 +2368,7 @@ window.addEventListener('afterprint', function afterPrint(evt) {
|
|||||||
|
|
||||||
(function fullscreenClosure() {
|
(function fullscreenClosure() {
|
||||||
function fullscreenChange(e) {
|
function fullscreenChange(e) {
|
||||||
var isFullscreen = document.fullscreen || document.mozFullScreen ||
|
var isFullscreen = document.fullscreenElement || document.mozFullScreen ||
|
||||||
document.webkitIsFullScreen;
|
document.webkitIsFullScreen;
|
||||||
|
|
||||||
if (!isFullscreen) {
|
if (!isFullscreen) {
|
||||||
|
Loading…
Reference in New Issue
Block a user