Chapter 5: Modern JavaScript

The async attribute is in IE10 and most other browsers other than Android versions 2.3 and below and Opera. The defer attribute is the same but also has support at least back to IE8.

The addEventListener() method is in IE9 and above and all other major browsers, as is the DOMContentLoaded event.

Despite the uncertainty around existing patents, touch events are in Chrome, Firefox, Safari for iOS, and Android. IE10 has support for pointer events, such as MSPointerDown, which are vendor prefixed.

The querySelector() and querySelectorAll() methods are fully implemented in all modern browsers, from IE8 and higher. The getElementsByClassName() method is almost as well implemented, lacking support only in IE8. The classList ...

Get The Modern Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.