mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Fix warnings in strict mode
This commit is contained in:
parent
2c6935f868
commit
674d6a7d18
4 changed files with 25 additions and 10 deletions
|
@ -163,7 +163,7 @@
|
|||
|
||||
// IE9 text/html data URI
|
||||
(function checkDocumentDocumentModeCompatibility() {
|
||||
if (document.documentMode !== 9)
|
||||
if (!('documentMode' in document) || document.documentMode !== 9)
|
||||
return;
|
||||
// overriding the src property
|
||||
var originalSrcDescriptor = Object.getOwnPropertyDescriptor(
|
||||
|
|
|
@ -178,7 +178,9 @@ var PDFView = {
|
|||
|
||||
while (sidebar.hasChildNodes())
|
||||
sidebar.removeChild(sidebar.lastChild);
|
||||
clearInterval(sidebar._loadingInterval);
|
||||
|
||||
if ('_loadingInterval' in sidebar)
|
||||
clearInterval(sidebar._loadingInterval);
|
||||
|
||||
var container = document.getElementById('viewer');
|
||||
while (container.hasChildNodes())
|
||||
|
@ -544,7 +546,8 @@ window.addEventListener('load', function webViewerLoad(evt) {
|
|||
params[unescape(param[0])] = unescape(param[1]);
|
||||
}
|
||||
|
||||
PDFView.open(params.file || kDefaultURL, parseFloat(params.scale));
|
||||
var scale = ('scale' in params) ? params.scale : kDefaultScale;
|
||||
PDFView.open(params.file || kDefaultURL, parseFloat(scale));
|
||||
|
||||
if (!window.File || !window.FileReader || !window.FileList || !window.Blob)
|
||||
document.getElementById('fileInput').style.display = 'none';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue