Refactor resizeImage method (#7236)
- Use URL.createObjectURL (replace from FileReader) - Use HTMLCanvasElement.prototype.toBlob (replace from HTMLCanvasElement.prototype.toDataURL) - Use Promise (replace callback interface)
This commit is contained in:
parent
660cb058e1
commit
0758b00bfd
7 changed files with 120 additions and 95 deletions
|
@ -12,12 +12,13 @@ function importExtraPolyfills() {
|
|||
|
||||
function loadPolyfills() {
|
||||
const needsBasePolyfills = !(
|
||||
Array.prototype.includes &&
|
||||
HTMLCanvasElement.prototype.toBlob &&
|
||||
window.Intl &&
|
||||
Number.isNaN &&
|
||||
Object.assign &&
|
||||
Object.values &&
|
||||
Number.isNaN &&
|
||||
window.Symbol &&
|
||||
Array.prototype.includes
|
||||
window.Symbol
|
||||
);
|
||||
|
||||
// Latest version of Firefox and Safari do not have IntersectionObserver.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue