Comparing version 0.8.7 to 0.8.8
@@ -118,10 +118,11 @@ //List from node-htmlparser | ||
} | ||
if (node._childNodes.length > 0) { | ||
var len = node._childNodes.length; | ||
if (len > 0) { | ||
if (node._childNodes[0].nodeType !== node.TEXT_NODE) { | ||
ret += eol; | ||
} | ||
for (i=0; i<node._childNodes.length; i++) { | ||
for (i=0; i<len; i++) { | ||
ret += generateHtmlRecursive(node._childNodes[i], childNodesRawText, curIndent + indentUnit); | ||
} | ||
if (node._childNodes[node._childNodes.length - 1].nodeType !== node.TEXT_NODE) { | ||
if (node._childNodes[len - 1].nodeType !== node.TEXT_NODE) { | ||
ret += curIndent; | ||
@@ -128,0 +129,0 @@ } |
@@ -532,4 +532,4 @@ /* | ||
if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { | ||
var tmpNode; | ||
while (newChild._childNodes.length > 0) { | ||
var tmpNode, i = newChild._childNodes.length; | ||
while (i-- > 0) { | ||
tmpNode = newChild.removeChild(newChild.firstChild); | ||
@@ -634,3 +634,3 @@ this.insertBefore(tmpNode, refChild); | ||
} | ||
for (var i=0;i<this._childNodes.length;i++) { | ||
for (var i=0,len=this._childNodes.length;i<len;i++) { | ||
if (this._childNodes[i]._attach) { | ||
@@ -648,3 +648,3 @@ this._childNodes[i]._attach(); | ||
} | ||
for (var i=0;i<this._childNodes.length;i++) { | ||
for (var i=0,len=this._childNodes.length;i<len;i++) { | ||
this._childNodes[i]._detach(); | ||
@@ -651,0 +651,0 @@ } |
{ | ||
"name": "jsdom", | ||
"version": "0.8.7", | ||
"version": "0.8.8", | ||
"description": "A JavaScript implementation of the W3C DOM", | ||
@@ -5,0 +5,0 @@ "keywords": ["dom", "w3c", "html"], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
355212
10316