1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Allow relative URLs in getDocument

This commit is contained in:
Yury Delendik 2012-07-26 12:11:28 -05:00
parent b3a603c199
commit af4bd10c70
3 changed files with 12 additions and 3 deletions

View file

@ -395,7 +395,7 @@ var PDFView = {
if (typeof url === 'string') { // URL
this.url = url;
document.title = decodeURIComponent(getFileName(url)) || url;
parameters.url = PDFJS.combineUrl(window.location.href, url);
parameters.url = url;
} else if (url && 'byteLength' in url) { // ArrayBuffer
parameters.data = url;
}