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

Published: | Categories: DOM

Description

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>.

References