New in JavaScript

From many new ways of DOM traversal to a whole new range of events, JavaScript has changed plenty in the past three or four years. If you don’t actively follow or keep up with the JavaScript community, you can easily miss it.

In this section, I run through some of the new features of JavaScript, chosen on the massively unscientific basis of how useful I think they are. This section includes by no means everything that’s new in the language—just a handful of methods, attributes, and events you might use often in your day-to-day web builds.

The async and defer Attributes

A browser’s default behavior is to load all page elements in order and execute JavaScript files as soon as they’re encountered, which blocks HTML parsing. ...

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.