- Linting (ESLint): Prefer addEventListener, exponentiation operator, avoiding catastrophic regexes, prefer spread, prefer startsWith/endsWith, no fn ref in iterator
- npm: Update devDeps (rollup and eslint-config-ash-nazg)
This commit is contained in:
6
dist/extensions/imagelib/index.js
vendored
6
dist/extensions/imagelib/index.js
vendored
@@ -43,8 +43,7 @@
|
||||
|
||||
if (!href.includes('.svg')) {
|
||||
var img = new Image();
|
||||
|
||||
img.onload = function () {
|
||||
img.addEventListener('load', function () {
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = this.width;
|
||||
canvas.height = this.height; // load the raster image into the canvas
|
||||
@@ -67,8 +66,7 @@
|
||||
href: href,
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
img.src = href;
|
||||
} else {
|
||||
// Do ajax request for image's href value
|
||||
|
||||
Reference in New Issue
Block a user