Comparing version 2.2.3 to 2.3.0
@@ -213,6 +213,10 @@ (function(root, factory) { | ||
if (e1.attributes.id && e1.attributes.id === e2.attributes.id) { | ||
var idDescriptor = e1.nodeName + '#' + e1.attributes.id; | ||
if (idDescriptor in uniqueDescriptors) { | ||
return true; | ||
if (e1.attributes.id) { | ||
if (e1.attributes.id !== e2.attributes.id) { | ||
return false; | ||
} else { | ||
var idDescriptor = e1.nodeName + '#' + e1.attributes.id; | ||
if (idDescriptor in uniqueDescriptors) { | ||
return true; | ||
} | ||
} | ||
@@ -711,3 +715,5 @@ } | ||
} | ||
if (aNode.childNodes && aNode.childNodes.length > 0) { | ||
if (objNode.nodeName === 'TEXTAREA') { | ||
objNode.value = aNode.value; | ||
} else if (aNode.childNodes && aNode.childNodes.length > 0) { | ||
objNode.childNodes = []; | ||
@@ -1115,6 +1121,2 @@ nodeArray = Array.prototype.slice.call(aNode.childNodes); | ||
node.data = diff[this._const.newValue]; | ||
if (parentNode.nodeName === 'TEXTAREA') { | ||
parentNode.value = diff[this._const.newValue]; | ||
} | ||
break; | ||
@@ -1121,0 +1123,0 @@ case this._const.modifyValue: |
{ | ||
"name": "diff-dom", | ||
"version": "2.2.3", | ||
"version": "2.3.0", | ||
"description": "A diff for DOM elements, as client-side JavaScript code. Gets all modifications, insertions and removals between two DOM fragments.", | ||
@@ -5,0 +5,0 @@ "main": "diffDOM.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
312991
1413