Real-world standards

Earlier this year, developers implemented a few Microsoft-inspired JavaScript/DOM extensions in Mozilla. I was pleasantly surprised to see such pragmatic behavior. Perhaps Dave Hyatt’s post about real-world standards inspired them:

We have a phrase we like to use… and that’s “real-world standards compliance.” What that means is that where possible we attempt to be fully compatible with the W3C standards, but we also want to support the real-world standards, i.e., extensions that for better or worse have become de facto standards. If you really do believe we should not have implemented [a particular non-W3C standardized extension], then you are simply out of touch with reality.

Whatever the reason, with the fix for bug 248549 and bug 246964, Mozilla gained support for “undetected document.all usage”.

What does that mean? Well, hopefully it means that more sites just work correctly. Many current sites use detection of document.all as a quick way to check for IE. Code like if (document.all) { // Do IE stuff } will continue to fail after these bug fixes. What is interesting is that there are older websites (and intranet sites) that just assume that the IE-specific document.all collection exists and go ahead and use it. With these bug fixes, in most cases this document.all usage will work and for somewhat simplistic DHTML, this can make the site usable.

I accidentally ran across a site that was fixed by this change. A coworker pointed it out to me and complained that it wasn’t working correctly in Firefox 0.9. (Go here and click the More Search Options link at the bottom of page.) I examined the site and noticed the undetected document.all usage. Since I had Firefox 1.0PR, I demonstrated that it now worked. There’s now another happy Firefox user in the office!