Errata

HTML5 Cookbook

Errata for HTML5 Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
PDF
Page xv
3rd paragraph

Along with my co-lead author, Kyle Simpson, I congratulate and thank the contributors
to the HTML5 Cookbook: Emily Lewis, Kimberly Blessing, Christina Huggins Ramey,
Anitra Pavka, Marc Grabanski, and Christopher Deustch.

The gentleman's name is "Deutsch", not "Deustch".

Anonymous  Jan 01, 2012 
PDF, ePub
Page 10
After 4th paragraph


Book: "HTML5 Canvas"
Chapter: "Chapter 1 - Introduction to HTML5 Canvas"
Section: "Testing to See Whether the Browser Supports Canvas"
Page: 10

====================================================================

The code following the 4th paragraph on page 10 shows a function named "canvasSupport", which reads as:

---
function canvasSupport () {
???return !!document.createElement('testcanvas').getContext;
}
---

There is no tag named "testcanvas" in HTML5.

I believe you mean to create a "canvas" element, and so the code should read:

---
function canvasSupport () {
???return !!document.createElement('canvas').getContext;
}
---

Note that "testcanvas" is replaced by "canvas".

Note from the Author or Editor:
change "testcanvas" to "canvas"

Jeremy French  Sep 16, 2012 
29
United States

The end Line 2 on this page refers to Chapter 8 for the Local Storage API when this is actually referenced in Chapter 10.

Note from the Author or Editor:
Change "Chapter 8" to "Chapter 10"

Beau Hahn  Mar 01, 2012 
PDF
Page 41
3rd and 4th paragraphs

When the audio element isn?t supported, Modernizr adds a no-audio class to the
header element.
[...]
When the audio element is supported, however, Modernizr adds the audio class to the
header element.


I think it should read in both cases "to the HTML (root) element", instead of header-element.

Note from the Author or Editor:
change "header element" to "<html> element"

Anonymous  Jan 02, 2012 
PDF
Page 126
First code sample under "Discussion"

Book: "HTML5 Cookbook"
Chapter: "Chapter 5 - Native Video"
Section: "5.6 Sample Design: Manipulating Video with <canvas>"
Page: 126

================================================================

The code shown in Discussion has a typo.

A javascript line in the function "generatePreview" has a typo in the parameter passed to "getElementById". The line reads:

var canvas2 = document.getElementById('previewsSm');

The id is actually "previewSm" (which is the id shown for the markup tag "canvas"), and so the line should read:

var canvas2 = document.getElementById('previewSm');

Note from the Author or Editor:
change "previewsSm" to "previewSm"

Jeremy French  Feb 20, 2013