mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Move the disableCreateObjectURL
option from the global PDFJS
object and into getDocument
instead
This commit is contained in:
parent
05c05bdef5
commit
1d03ad0060
11 changed files with 54 additions and 36 deletions
|
@ -84,6 +84,10 @@ let FirefoxCom = (function FirefoxComClosure() {
|
|||
})();
|
||||
|
||||
class DownloadManager {
|
||||
constructor(options) {
|
||||
this.disableCreateObjectURL = false;
|
||||
}
|
||||
|
||||
downloadUrl(url, filename) {
|
||||
FirefoxCom.request('download', {
|
||||
originalUrl: url,
|
||||
|
@ -92,7 +96,7 @@ class DownloadManager {
|
|||
}
|
||||
|
||||
downloadData(data, filename, contentType) {
|
||||
let blobUrl = createObjectURL(data, contentType, false);
|
||||
let blobUrl = createObjectURL(data, contentType);
|
||||
|
||||
FirefoxCom.request('download', {
|
||||
blobUrl,
|
||||
|
@ -256,8 +260,8 @@ PDFViewerApplication.externalServices = {
|
|||
FirefoxCom.request('reportTelemetry', JSON.stringify(data));
|
||||
},
|
||||
|
||||
createDownloadManager() {
|
||||
return new DownloadManager();
|
||||
createDownloadManager(options) {
|
||||
return new DownloadManager(options);
|
||||
},
|
||||
|
||||
createPreferences() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue