mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Use Blob constructor when available instead of deprecated MozBlobBuilder.
This commit is contained in:
parent
130447755e
commit
739ee47865
3 changed files with 15 additions and 8 deletions
|
@ -662,3 +662,12 @@ var StatTimer = (function StatTimerClosure() {
|
|||
};
|
||||
return StatTimer;
|
||||
})();
|
||||
|
||||
PDFJS.createBlob = function createBlob(data, contentType) {
|
||||
if (typeof Blob === 'function')
|
||||
return new Blob([data], { type: contentType });
|
||||
// Blob builder is deprecated in FF14 and removed in FF18.
|
||||
var bb = new MozBlobBuilder();
|
||||
bb.append(data);
|
||||
return bb.getBlob(contentType);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue