One reason why things like this have never happened before is because the people who need this are only barely capable of working with HTML. The DOM supports a wide variety of technologies far outside and unrelated to HTML.
There are no parts of DOM APIs that are functional. It's all 90s-era Java OOP-style.
DOM API is 90-s era OOP