Skip to content

Commit

Permalink
corrected error message from table that required child node of tables…
Browse files Browse the repository at this point in the history
… to all be elements
  • Loading branch information
thatcher committed Nov 12, 2009
1 parent a253bf7 commit 2c4dbd1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/html/table.js
Expand Up @@ -61,7 +61,7 @@ __extend__(HTMLTableElement.prototype, {
appendChild : function (child) {

var tagName;
if(child.tagName){
if(child&&child.nodeType==DOMNode.ELEMENT_NODE){
tagName = child.tagName.toLowerCase();
if (tagName === "tr") {
// need an implcit <tbody> to contain this...
Expand All @@ -81,7 +81,8 @@ __extend__(HTMLTableElement.prototype, {
return DOMNode.prototype.appendChild.apply(this, arguments);
}
}else{
$error('HTMLTableElement.appendChild => child.tagName should not be undefined here... Fix ME!');
//tables can still have text node from white space
return DOMNode.prototype.appendChild.apply(this, arguments);
}
},

Expand Down

0 comments on commit 2c4dbd1

Please sign in to comment.