mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Create element with innerHTML
This commit is contained in:
parent
5865eb032a
commit
2a3ab88cde
3 changed files with 10 additions and 2 deletions
|
@ -277,9 +277,13 @@ function createElement ( doc, tag, props, children ) {
|
|||
}
|
||||
}
|
||||
if ( children ) {
|
||||
if (Array.isArray(children)) {
|
||||
for ( i = 0, l = children.length; i < l; i += 1 ) {
|
||||
el.appendChild( children[i] );
|
||||
}
|
||||
} else if (typeof children === 'string') {
|
||||
el.innerHTML = children;
|
||||
}
|
||||
}
|
||||
return el;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -146,9 +146,13 @@ function createElement ( doc, tag, props, children ) {
|
|||
}
|
||||
}
|
||||
if ( children ) {
|
||||
if (Array.isArray(children)) {
|
||||
for ( i = 0, l = children.length; i < l; i += 1 ) {
|
||||
el.appendChild( children[i] );
|
||||
}
|
||||
} else if (typeof children === 'string') {
|
||||
el.innerHTML = children;
|
||||
}
|
||||
}
|
||||
return el;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue