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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access