Highlight that `dataURLToBlob` is synchronous
This commit is contained in:
parent
b9c6bf600f
commit
fdc3ef289d
|
@ -104,7 +104,7 @@
|
|||
i = i - 1;
|
||||
// TODO: Replace with native `Canvas::toBlob`:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
|
||||
blob = window.dataURLToBlob(
|
||||
blob = window.dataURLToBlobSync(
|
||||
canvas.toDataURL('image/jpeg', quality)
|
||||
);
|
||||
quality = quality * maxSize / blob.size;
|
||||
|
@ -233,7 +233,7 @@
|
|||
|
||||
// TODO: Replace with native `Canvas::toBlob`:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
|
||||
var blob = window.dataURLToBlob(canvas.toDataURL('image/png'));
|
||||
var blob = window.dataURLToBlobSync(canvas.toDataURL('image/png'));
|
||||
|
||||
resolve(blob);
|
||||
};
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
window.nodeSetImmediate(function() {});
|
||||
}, 1000);
|
||||
|
||||
window.dataURLToBlob = require('blueimp-canvas-to-blob');
|
||||
window.dataURLToBlobSync = require('blueimp-canvas-to-blob');
|
||||
window.loadImage = require('blueimp-load-image');
|
||||
window.ProxyAgent = require('proxy-agent');
|
||||
window.EmojiConvertor = require('emoji-js');
|
||||
|
|
Loading…
Reference in New Issue