We will not discuss this particular mistake here except to mention that it is a security vulnerability waiting for exploitation.
This was an invention of Microsoft. While slightly less reckless that
document.write, it is also unsafe and should no longer be used.
The DOM is a clumsy API for creating, linking, manipulating, and destroying nodes in the document tree. Twenty years ago I was recommending that it not be used directly, that an intervening library should be used instead. My reasons were that the DOM was poorly designed, poorly implemented, and full of inconsistencies from one brand of browser to the other, and from one version to another. The DOM was a deep source of pain and misery that could be mitigated by a good library.
Somehow, in the course of interacting with the user, we acquire some data that we present as a table:
The DOM is verbose and weird. We make it a little nicer with a wee
dom function that makes a node and links text and other nodes to it. Thus armed, we can build the table and link it into a