HTMLTableElement.insertRow now always inserts the row to <tbody>

Published: | Categories: DOM | Creative Commons BY-SA 3.0


The behaviour of the HTMLTableElement.insertRow method has been changed to follow the latest HTML5 spec. When there is a <thead> but no <tbody> and <tr>, the new <tr> will be inserted to a newly created <tbody> instead of the existing <thead>.