[GENERIC viewer] Remove some, now unnecessary, checks used with fileInput
According to the MDN compatibility data, see below, all of these features have been supported for years and years in all browsers. Looking closely at the data, the most likely reason for adding these checks in the first place was for IE 9 compatibility (since we originally "supported" that browser). - https://developer.mozilla.org/en-US/docs/Web/API/File#browser_compatibility - https://developer.mozilla.org/en-US/docs/Web/API/FileReader#browser_compatibility - https://developer.mozilla.org/en-US/docs/Web/API/FileList#browser_compatibility - https://developer.mozilla.org/en-US/docs/Web/API/Blob#browser_compatibility
This commit is contained in:
parent
5390d2b377
commit
07ac5c337f
14
web/app.js
14
web/app.js
@ -2085,7 +2085,7 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||
"https://mozilla.github.io",
|
||||
];
|
||||
validateFileURL = function (file) {
|
||||
if (file === undefined) {
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@ -2157,17 +2157,7 @@ function webViewerInitialized() {
|
||||
|
||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||
const fileInput = appConfig.openFileInput;
|
||||
if (
|
||||
!window.File ||
|
||||
!window.FileReader ||
|
||||
!window.FileList ||
|
||||
!window.Blob
|
||||
) {
|
||||
appConfig.toolbar.openFile.hidden = true;
|
||||
appConfig.secondaryToolbar.openFileButton.hidden = true;
|
||||
} else {
|
||||
fileInput.value = null;
|
||||
}
|
||||
fileInput.value = null;
|
||||
|
||||
fileInput.addEventListener("change", function (evt) {
|
||||
const { files } = evt.target;
|
||||
|
Loading…
x
Reference in New Issue
Block a user