Index: lib/aardvark.js |
=================================================================== |
--- a/lib/aardvark.js |
+++ b/lib/aardvark.js |
@@ -733,39 +733,39 @@ let Aardvark = exports.Aardvark = |
switch (node.nodeType) |
{ |
case node.ELEMENT_NODE: |
var box = this.window.document.createElement("vbox"); |
box.className = "elementBox"; |
var startTag = this.window.document.createElement("hbox"); |
startTag.className = "elementStartTag"; |
- if (!node.firstElementChild) |
+ if (!node.firstChild) |
startTag.className += " elementEndTag"; |
this.appendDescription(startTag, "<", null); |
this.appendDescription(startTag, node.tagName, "tagName"); |
for (var i = 0; i < node.attributes.length; i++) |
{ |
var attr = node.attributes[i]; |
this.appendDescription(startTag, attr.name, "attrName"); |
if (attr.value != "") |
{ |
this.appendDescription(startTag, "=", null); |
this.appendDescription(startTag, '"' + attr.value.replace(/"/, """) + '"', "attrValue"); |
} |
} |
- this.appendDescription(startTag, node.firstElementChild ? ">" : " />", null); |
+ this.appendDescription(startTag, node.firstChild ? ">" : " />", null); |
box.appendChild(startTag); |
- if (node.firstElementChild) |
+ if (node.firstChild) |
{ |
- for (var child = node.firstElementChild; child; child = child.nextElementSibling) |
+ for (var child = node.firstChild; child; child = child.nextSibling) |
this.getOuterHtmlFormatted(child, box); |
var endTag = this.window.document.createElement("hbox"); |
endTag.className = "elementEndTag"; |
this.appendDescription(endTag, "<", null); |
this.appendDescription(endTag, "/" + node.tagName, "tagName"); |
this.appendDescription(endTag, ">", null); |
box.appendChild(endTag); |