There is already one(i.e. HTML5 input types) but it's quite incomplete and poorly supported so we have to reinvent the wheel with CSS and JS which makes the web apps inconsistent and slow. The main issue is that the internet must be backwards compatible and browser vendors are reluctant to provide shiny features due the maintenance costs.
Hopefully WASM will fix the performance issue and the internet speed will get fast enough to compile and serve mature frameworks such Cocoa.
That doesn't mention HTML but focuses on avoiding JS entirely, so presumably there'd be some more direct way to invoke the program (but don't take my word for it ;) )