mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Use substitute of isArrayBuffer
This commit is contained in:
parent
3ddf9b5dfd
commit
176e534a26
1 changed files with 2 additions and 2 deletions
|
@ -333,11 +333,11 @@ var PDFView = {
|
||||||
|
|
||||||
open: function pdfViewOpen(url, scale, password) {
|
open: function pdfViewOpen(url, scale, password) {
|
||||||
var parameters = {password: password};
|
var parameters = {password: password};
|
||||||
if (typeof url === 'string') {
|
if (typeof url === 'string') { // URL
|
||||||
this.url = url;
|
this.url = url;
|
||||||
document.title = decodeURIComponent(getFileName(url)) || url;
|
document.title = decodeURIComponent(getFileName(url)) || url;
|
||||||
parameters.url = url;
|
parameters.url = url;
|
||||||
} else if (isArrayBuffer(url)) {
|
} else if (url && 'byteLength' in url) { // ArrayBuffer
|
||||||
parameters.data = url;
|
parameters.data = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue