Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comprehensive cross browser listing of Javascript function support

I'm getting back into the wild world of cross browser compatibility, and have come across a few nagging issues with Javascript compatibility between browsers.

For example, I use style inheritance a great deal in my CSS sheets, so if I need to edit an element's style, I have to use window.getComputedStyle(**element**, [pseudoElement]).getPropertyValue(**style**)

Using that one line of code requires me to know that Firefox v<4 requires a pseudoElement object, whereas other browsers consider it an optional parameter. In addition, Firefox and Opera require that style fit the CSS property name, such as font-size, where IE needs the name in Javscript syntax fontSize due to interpreting the hypen in the CSS syntax as a minus sign.

This one example took a few hours of figuring out why earlier versions of IE were implementing my text-resize script with the script's default size, rather than the element's computed size. Mozilla's site is a great reference, but is limited to their browsers. Is there a good comprehensive cross browser function listing?

like image 794
Jason Avatar asked Aug 11 '11 01:08

Jason


2 Answers

I don't think you will find a single site that lists them all—there are just way too many incompatibilities and far too many browsers to consider. Some help can be found on the Quirksmode compatibility tables and there is also the Thomas Lahn's ECMAScript support matrix.

Other than that, you can troll through various javscript library source code and look for comments, however use with caution as often the comments are ill informed or poorly worded - they aren't really meant to be a resource for browser incompatibilities.

like image 70
RobG Avatar answered Oct 09 '22 02:10

RobG


Mozilla's MDN does have a notice at the bottom of each page about browser support for the object/function. But yeah, it's not really an exhaustive source.

So for browser compatibility, PPK's Quirksmode is the most comprehensive source, I think.

like image 23
Flambino Avatar answered Oct 09 '22 02:10

Flambino