Chapter 10. Advanced HTML5 JavaScript

Kyle Simpson


HTML5 has dramatically broadened its scope from previous revisions. Whereas HTML4 was primarily focused on markup, HTML5 is focused not only on markup but also on a variety of advanced JavaScript APIs that help bring new features to life. However, most of these new technologies actually have their own specifications, working groups, etc., so it can be confusing to refer to the entire group of technologies under one umbrella term like “HTML5.” It is for this reason that, as a way of being more precise, the trend has become to discuss such APIs as companions to HTML5—or, as some have put it, “HTML5 and friends.” So, in this chapter, we get familiar with several friends of HTML5.

We’ve already covered the JavaScript APIs behind several markup-anchored elements, such as canvas, audio, and video. Here, our focus is on some other companion APIs, which notably are not necessarily tied to a particular markup element. You can think of the recipes in this chapter as being the meat on the bones of what it takes to create a truly interactive web application.

It’s important to note that the technologies discussed in this chapter are in varying degrees of standardization and implementation. They are not universally agreed upon or built into browsers yet, so using them requires some caution and planning. For some things, there are ways to fall back to older or less-capable functionality in non-supporting browsers, but in other cases you ...

Get HTML5 Cookbook 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.