mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
Add: Return value for replaceWith, element that replaced original node.
This commit is contained in:
parent
5865eb032a
commit
4d728ee592
3 changed files with 3 additions and 3 deletions
|
@ -248,7 +248,7 @@ function detach ( node ) {
|
|||
function replaceWith ( node, node2 ) {
|
||||
var parent = node.parentNode;
|
||||
if ( parent ) {
|
||||
parent.replaceChild( node2, node );
|
||||
return parent.replaceChild( node2, node );
|
||||
}
|
||||
}
|
||||
function empty ( node ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -117,7 +117,7 @@ function detach ( node ) {
|
|||
function replaceWith ( node, node2 ) {
|
||||
var parent = node.parentNode;
|
||||
if ( parent ) {
|
||||
parent.replaceChild( node2, node );
|
||||
return parent.replaceChild( node2, node );
|
||||
}
|
||||
}
|
||||
function empty ( node ) {
|
||||
|
|
Loading…
Reference in a new issue