> The DOM is very ill-suited for most UI. Too complex and lots of missing features
Can you expand on this, because I'm not seeing it myself. The DOM, html+css is very flexible. It easily encompasses most UI. Most UI is some kind of data display, so lists, trees, tables, forms.
The need for JS might be what you're complaining about. I think we might be stuck with it as a UI control language forever.
The DOM(and CSS) is primarily built for documents and forms, even with the latest addition like Flexbox or Grid layouts. It is closer to typesetting tools like troff, latex, texinfo than any UI engines you can think of. And some that are not needed, like the difference between <i>, <a>, <span>, <strong>,...
Also with most GUI frameworks, there's some difference between widgets like label, button, menu, checkbox,... and containers that does layout management. And there are not a lot of elements in both sets. This is the reason why React Native has a very sparse components library. With simpler implementation, you have a simpler rendering path, and the developer have less elements to deal with.
Also some have ready-made implementation of really useful widgets, like tree, grids, tables, lists, and other dynamic things. You can find libraries for those on the web, but the web implementation of scrollable container is janky.
The GUI system for the NeXT was based on the Display PostScript system which in turn was based for the PostScript system designed for rendering to printers. Quartz in MacOS X is a further evolution of that.
Inside HTML 5 you can find facilities for rendering documents and you can find facilities for rendering applications, including those forms. There is not a clear line between one and the other.
PostScript was for rendering graphics to a printer with a good emphasis on texts. Most of HTML is about marking up and styling interactive documents. There’s no clear line between the two, but an API for applications UI has different goals than one for document typesetting (even interactive one).
HTML have a lot of tools for devex, but if you’re going for a good codebase and simple implementation for a desktop application, QT is way easier.
I don't know about "most UI" but it's sure as shit ill-suited for CAD (what I work on).
In which case you get canvas, WebXR, etc.