Monday, November 24, 2014

Resources for JavaScript and DOM Compatibility Tables

One of the best info-apps to come about in recent years is the well-known and super-practical Can I Use by Alexis Deveria.


Although Can I Use is great for many cutting-edge features, there’s still a lot of JavaScript and DOM stuff that’s not included in there. So what other options are there for looking up browser support for many different JavaScript and DOM features?


I’m always doing research on various front-end technologies, but the one thing I’ve yet to find is a really good one-stop resource that lists browser support for all aspects of JavaScript and the DOM, including the various HTML5 APIs.


Although a single resource doesn’t really exist (at least none that I know of), there are a few resources I’ve come across that, together, form a pretty good overview of which features are supported in which browsers, and in particular any older versions of IE that you might still have to support.


Of Course, Actual Testing Trumps All


Before getting into the resources, I think it goes without saying that doing actual testing on the different devices and browsers that you have to support should always be the primary method for determining support.


It’s nice to be able to get a second-hand overview of support. But “support” tables don’t always include any relevant bugs that might make the feature in question unusable. And that’s besides the fact that some resources can be just plain wrong.


So make sure to do testing and use the references described in this article as guides, not as the final word on whether something works in a particular browser on a particular platform on a particular device.


MDN’s reference


If you can’t find something on Can I Use, the first place you should look is Mozilla’s Developer Network. And I’m sure most of you do just that. In most cases, that’s all you’ll need to get a good preliminary overview of support for a particular JavaScript feature that you can’t find on Can I Use


For example, let’s say you want to look up addEventListener() and removeEventListener. You won’t find those on Can I Use. But you can find both, with browser info, on MDN.


MDN's compatibility tables


As you can see in the screen grab above, in addition to the details showing which browsers have “Basic support”, there’s often additional info in that chart on features that might have been added in later versions of ECMAScript.


Remember also that MDN’s reference is editable by anyone, so if you discover that something is incorrect, feel free to update it.


Continue reading %Resources for JavaScript and DOM Compatibility Tables%




by Louis Lazaris via SitePoint

No comments:

Post a Comment