Use substitute of isArrayBuffer

This commit is contained in:
Jakob Miland 2012-05-17 21:00:29 +02:00
parent 3ddf9b5dfd
commit 176e534a26

View File

@ -333,11 +333,11 @@ var PDFView = {
open: function pdfViewOpen(url, scale, password) {
var parameters = {password: password};
if (typeof url === 'string') {
if (typeof url === 'string') { // URL
this.url = url;
document.title = decodeURIComponent(getFileName(url)) || url;
parameters.url = url;
} else if (isArrayBuffer(url)) {
} else if (url && 'byteLength' in url) { // ArrayBuffer
parameters.data = url;
}