I think a browser is an inverted universal engine. The underlying tech is solid, but on top of it sits the DOM and scripting, and then apps have to build on top of
that mess. In my opinion, it would be much better for web apps and the DOM to be sibling implementations using the same engine, not hierarchically related. You wouldn’t use Excel as a foundation to make software, even though you could.
Maybe useful higher-level elements like layout, typography, etc. could be shared as frameworks.