46 ms·
Why not just replace html entirely with a vm? All websites are obfuscated webasm programs that get a frame buffer to write pixels directly to the browser window
by sthnblllII 6y ago
Why not just replace html entirely with a vm? All websites are obfuscated webasm programs that get a frame buffer to write pixels directly to the browser window. You want to be able to select text? Pray the website implements that "feature". Right click to show source? Ha. Good luck figuring out what the code is doing.
Im describing taking Mozilla's logic to the extreme to show where it has led us.
- zamadatix 6y agoRequesting the content and injecting it into the document are both first party browser apis though. They didn't want for everyone to make a custom implementation they wanted for people to use the existing browser APIs. Just because something is done in JavaScript doesn't mean it's 3rd party, most of a browsers first party interfaces are in JS. What you've extrapolated is what would happen if each interface for funxtionality were left to 3rd parties, not what happens if the browser implements first party interfaces in JS instead of HTML. E.g. in your example of extrapolating it all the way it wouldn't be "everyone has to create a button and draw it to the screen" it'd be "to create a button you can create it in JS instead of HTML" And even then that's only assuming that because they made one choice on one thing the same choice would make as much sense for other things.
- xg15 6y agoMany site authors have an active interest in retaining the full control about what the user can do on their site, even against the interests of the user. So even if a functionality could in theory be delegated to the browser, I think there are real incentives for sites to implement it themselves if this gives them more control about user behavior. A website just being WASM + canvas would actually be in the interests of many site operators. I don't think the presence or absence of the "import HTML" feature would change a lot in this incentive structure, so this is more of a tangent. However, including the feature would at least have sites that don't want to go this way some support.