NodeList<TableRowElement> rows = e.getRows();
TableRowElement newRow = Document.get().createTRElement();
if (rows.getLength() < 1) {
TableSectionElement tbody = Document.get().createTBodyElement();
e.appendChild(tbody);
tbody.appendChild(newRow);
} else {
if (index == -1 || index >= rows.getLength()) {
TableRowElement after = rows.getItem(rows.getLength() - 1);
after.getParentElement().insertAfter(newRow, after);