Remove code-paths only relevant for IE 11/Edge (non-Chromium based) from the web/ folder

This patch purposely starts small, by removing IE-specific code from various JS/CSS files in the `web/` folder.

There's obviously lots of potential for additional clean-up, especially the removal of no longer necessary polyfills in `src/shared/compatibility.js`, however that will require some care considering that certain polyfills may also be necessary for e.g. Node.js or the Chromium-extension as well.
Generally speaking, once we start removing polyfills it's probably a good idea to consult the compatibility information on https://developer.mozilla.org/ and also https://caniuse.com/ first. (Deciding on the lowest supported Chromium version, for the extension, would also seem like a good idea.)
This commit is contained in:
Jonas Jenwald 2020-09-05 17:00:52 +02:00
parent 4caa14b4dc
commit 87b002c52f
9 changed files with 9 additions and 47 deletions

View file

@ -92,8 +92,6 @@ class PDFPresentationMode {
this.container.mozRequestFullScreen();
} else if (this.container.webkitRequestFullscreen) {
this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
} else if (this.container.msRequestFullscreen) {
this.container.msRequestFullscreen();
} else {
return false;
}
@ -151,8 +149,7 @@ class PDFPresentationMode {
return !!(
document.fullscreenElement ||
document.mozFullScreen ||
document.webkitIsFullScreen ||
document.msFullscreenElement
document.webkitIsFullScreen
);
}
@ -478,7 +475,6 @@ class PDFPresentationMode {
"webkitfullscreenchange",
this.fullscreenChangeBind
);
window.addEventListener("MSFullscreenChange", this.fullscreenChangeBind);
}
}
@ -496,10 +492,6 @@ class PDFPresentationMode {
"webkitfullscreenchange",
this.fullscreenChangeBind
);
window.removeEventListener(
"MSFullscreenChange",
this.fullscreenChangeBind
);
}
delete this.fullscreenChangeBind;