Do not know to what extent you are serious, but I think the idea is that content should be HTML and apps should be just JS.
We could go further and have a language written to run in a sandbox VM especially for that with a GUI library designed for the task instead of being derived from a document format.