1
0
mirror of https://github.com/twitter/twemoji.git synced 2024-06-15 03:35:16 +00:00
This commit is contained in:
josephj 2016-04-04 12:48:23 +00:00
commit 6e9980bb1e
5 changed files with 34 additions and 2 deletions

View File

@ -516,6 +516,14 @@ define(function () {
} }
function parse(what, how) { function parse(what, how) {
// first argument can only be string or HTML Element
if (
typeof what !== 'string' &&
!(what && what.nodeName)
) {
return what;
}
if (!how || typeof how === 'function') { if (!how || typeof how === 'function') {
how = {callback: how}; how = {callback: how};
} }

View File

@ -515,6 +515,14 @@ var twemoji = (function (
} }
function parse(what, how) { function parse(what, how) {
// first argument can only be string or HTML Element
if (
typeof what !== 'string' &&
!(what && what.nodeName)
) {
return what;
}
if (!how || typeof how === 'function') { if (!how || typeof how === 'function') {
how = {callback: how}; how = {callback: how};
} }

2
2/twemoji.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -516,6 +516,14 @@ var twemoji = (function (
} }
function parse(what, how) { function parse(what, how) {
// first argument can only be string or HTML Element
if (
typeof what !== 'string' &&
!(what && what.nodeName)
) {
return what;
}
if (!how || typeof how === 'function') { if (!how || typeof how === 'function') {
how = {callback: how}; how = {callback: how};
} }

View File

@ -931,6 +931,14 @@ function createTwemoji(re) {
} }
function parse(what, how) { function parse(what, how) {
// first argument can only be string or HTML Element
if (
typeof what !== 'string' &&
!(what && what.nodeName)
) {
return what;
}
if (!how || typeof how === 'function') { if (!how || typeof how === 'function') {
how = {callback: how}; how = {callback: how};
} }