ADC Rates Web Browsers For Javascript Compatibility
blamanj writes "The Apple Developer's site has an article about Javascript compatibility. They rate the 6 Mac browsers for feature-completeness in the Javascript arena. For those who don't read articles, Mozilla wins by a nose."
Seriously, is this meaningful in any way whatsoever?
I'm basing this on my experience writing a contact form that thwarts spam. It has (optional) client side verification of the fields based on regular expressions. (The same regular expressions are then used again on the server, the client side stuff just makes it fail fast.) When a web browser thinks it supports JavaScript, but doesn't do it well enough this runs into problems. I keep finding browsers that like the regular expressions I use.
If you are using an uncommon browser, I would appretiate the testing. Please go to my contact page and fill out a valid email address but no subject or message. If your browser works correctly, you should not get an error about the email address. Then send me the results. (If you do have problems, disable JavaScript first.)
navigator.appName checking isn't portable, and it can be quite verbose (requires a check per browser per feature), whereas object detection (which is what they're doing here) allows you to detect whether or not a specific feature is supported without knowing what browsers support it.
Browser specific hacks are what got us into the document.all vs. document.layers mess in the 4.0 days anyway.
As for browser-specific-code WRT to the XML loading thing, there's little (if any) support for DOM 3 Load And Save (as there's no public spec yet), so executing conditional, browser specific code to get this functionality is necessaray. Mozilla has implemented the XMLHTTP object that first appeared in IE, and so it's kind of the defacto standard (similar to innerHTML, which would also go away with DOM 3 Load And Save), however creating these objects is different on the various platforms, and is again not standard.
Dojo: defanging browsers so you don't have to
Konqueror just got better Javascript debugging. It's in CVS now and it's slated to be part of 3.2. I wonder if Apple will pick this up sooner?