I created a table on my document using: document.body.appendChild(table)
now every time I make a change on my table I want to run
document.body.removeChild(table)
document.body.appendChild(table)
so that the content of the table on my page is updated. This does however not work in the first place as I get
app.js:75 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
as an error message, and it also seems like a really clunky solution to the problem.