mirror of
https://github.com/twitter/twemoji.git
synced 2024-06-15 03:35:16 +00:00
Add onerror as an option
This commit is contained in:
parent
9dcb7942ca
commit
a77ae2c44a
@ -664,7 +664,7 @@ function createTwemoji(re) {
|
||||
);
|
||||
if (src) {
|
||||
img = new Image();
|
||||
img.onerror = twemoji.onerror;
|
||||
img.onerror = options.onerror;
|
||||
img.setAttribute('draggable', 'false');
|
||||
attrib = options.attributes(icon, variant);
|
||||
for (attrname in attrib) {
|
||||
@ -828,7 +828,8 @@ function createTwemoji(re) {
|
||||
base: typeof how.base === 'string' ? how.base : twemoji.base,
|
||||
ext: how.ext || twemoji.ext,
|
||||
size: how.folder || toSizeSquaredAsset(how.size || twemoji.size),
|
||||
className: how.className || twemoji.className
|
||||
className: how.className || twemoji.className,
|
||||
onerror: how.onerror || twemoji.onerror
|
||||
});
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
twemoji.min.js
vendored
2
twemoji.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user