0
Fork 0
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:
Matthew Borden 2015-02-08 23:01:08 +11:00
parent 5865eb032a
commit 4d728ee592
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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 ) {