I'm not entirely sure how web browsers work. I haven't done any research into this idea, but from what I recall reading browsers use javascript to draw the HTML to screen.
So, I was just brainstorming about random programming ideas and kind of had a focus on web development and stuff. I was thinking about solutions to the problem of having to tailor my markup to the different browsers. This is a horrible thing to have to do and I wish I didn't have to do it. So, I was like well damn, I've got a cool idea but it's kind of similar to Flex. As I understand it, Flex uses the Flash Player to render layouts or something? You design your site with Flex, and it's rendered totally by the Flash Player? This is cool, because then it can be extended to your desktop using AIR, or however that beautiful mess of Adobe products works together.
Flex is great, it does what I think the only real solution to fixing this cross-browser, "tailor my markup" bullshit would have to do - get rid of HTML/CSS. This is a pretty scary task, though, that I probably think most of the world would be opposed to. HTML will remain what it is just for the simple fact that everyone uses it already. Who cares if it's good, bad, outdated, amazing, whatever you think it is - it's going to stick around. So, I kind of restated the 'solution' to myself.... get rid of HTML... orrrrr, relieve the browsers of this task. Which brings me to my idea...
Would it be possible to create a virtual machine that relieves browsers of the task of rendering the HTML? Could the virtual machine use some widely popular javascript engine and draw the HTML onto whatever browser the user made the request through? The browser could still handle the requests, and stuff, but the virtual machine could interject and take over the process of drawing the HTML. This would allow users to use their same favorite browser, it wouldn't shock the world by trying to kill off HTML, it wouldn't render old sites that aren't updated anymore obsolete... while adding the advantages of rendering pages the same on every browser.
Thoughts? Is this even possible?
Edit: I'm not even sure if there is a problem with this. I don't know if this is still a big issue these days. I don't typically have problems with my HTML/CSS. And, after thinking about this, the issue probably doesn't lie in the HTML. It's probably moreso the CSS. Now days most browsers seem to render things the same for the most part. I find myself following this work flow: 1) design markup 2) apply styles 3) fix any minor differences. So maybe it's not as big of an issue as I think it once may have been, though.