Hacker News new | ask | show | jobs
by Stormcaller 3951 days ago
I wonder if there was an idea of a "strict mode" at any point? When making sure every site works surely you guys will have to render invalid code "correctly", I assume.

For example I am willing to develop in your browser if it meant I wouldn't broke some rules and the browser would care about that. Of course html validators exist and browsers display invalid css in their inspectors but I am asking for something like that would expect valid code. throw an error in my face if I didn't close a html tag or used an invalid css value, at any point.

Like if a javascript code resulted in my page getting invalid layout then browser could yell at me that causes an invalid layout. Maybe even a small performance improvement if my code conformed to every layout rule.

2 comments

xhtml worked like that, html5 has moved towards specifying the quirks that are used to deal with poor conformance. That said, if you look at a webdev console, things that cause poor performance (à la document.write) tend to be noted.
Yes! A nice idea that... as has been previously mentioned XHTML failed due to there already being a version of the same thing with tonnes of automatic error handling built in! Which one will be most popular; a programming language that always seemed to complain and display an error, or one that 99% of the time corrected your mistakes for you.