void HTMLTableElement::setTFoot(PassRefPtrWillBeRawPtr<HTMLTableSectionElement> newFoot, ExceptionState& exceptionState) { deleteTFoot(); HTMLElement* child; for (child = Traversal<HTMLElement>::firstChild(*this); child; child = Traversal<HTMLElement>::nextSibling(*child)) { if (!child->hasTagName(captionTag) && !child->hasTagName(colgroupTag) && !child->hasTagName(theadTag)) break; } insertBefore(newFoot, child, exceptionState); }
void HTMLTableElement::setTFoot(HTMLTableSectionElement* newFoot, ExceptionState& exceptionState) { if (newFoot && !newFoot->hasTagName(tfootTag)) { exceptionState.throwDOMException(HierarchyRequestError, "Not a tfoot element."); return; } deleteTFoot(); if (newFoot) appendChild(newFoot, exceptionState); }