HTML and CSS Reference
In-Depth Information
CHAPTER 10
Advanced HTML5 JavaScript
Kyle Simpson
10.0 Introduction
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. How-
ever, 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 have to build a workflow into your appli-
cation that will handle when certain features are simply not present.
Because work on these particular sets of technologies is happening so
rapidly, and what we know at the time of writing may be outdated by
the time of reading, this chapter does not cover directly what things are
supported where. You are encouraged to test these features in your
target browser environments to get the most updated information.
 
Search WWH ::




Custom Search