Alan Kay makes the compelling argument that the object / actor / system itself should be the only one to know how to draw itself on the screen.
That is why we only need the X window system, and not a browser. Instead of the browser , we would have a multitude of drawing mechanisms.
The DOM is a single shared state that is changed by a multitude of asynchronous functions, thus it is the worst possible thing to do.
Reflection / inspection is a good property of the dom but smalltalk does have reflection as well.
I am not promoting smalltalk, by the way. I promote composable asynchronous systems , composable protocols.