Errata

HTML5 Hacks

Errata for HTML5 Hacks

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

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

Version Location Description Submitted by Date submitted
Hack 5 Safari Books Online
Code under the subheading "The Constraint Validation API"

In this book example code, there are closed curly braces after the if condition - so nothing happens regardless if the condition is true or false. The following line (input.setCustomValidity('') always executes.

function updateMessage(input){

if(input.value ==""){}
input.setCustomValidity('');

}

Pamela See  Jan 08, 2015 
ePub Page 37
3rd paragraph

You claim that "keyup" and "keydown" only apply to the document as a whole, not to specific input elements.

I'm confused about this:
On a demo page with two input elements, and an event listener for "keyup" attached to both, an input on either triggers the listener for the input.
Either event bubbles up to the window.

AFAIK this is the same for all user interaction on the document.

So why the hack of adding the event listeners on focus, and removing them again on blur?

Anonymous  Nov 10, 2013 
Printed Page 87
1st paragraph

In the first paragraph you're saying that for the following example you'll use the nth-of-type pseudoclass along with the keyword odd and you're doing so in the following sample code. But the first sentence after the code says that every other row (even rows) is shaded. Figure 2.18 on the next page (88) shows even rows shaded.
So my question is how the keyword odd is coloring even rows?

Anonymous  Sep 01, 2013 
Printed Page 111
code at top of page doesn't match figure

page 111:
<button id="myAction">Hello world!</button>

does not match image at bottom of page (Figure 2-43), which shows button with the text: "transition"

.elementStart {
width: 50%;
...
}

also does not match image, which shows div at 25%

page 112: Transition to What?
"The transition attribute is not the only attribute that can take a transition."

should be:

"The width attribute is not the only attribute that can take a transition."

This would then match the previous example.

Chris Willoughby  Jul 16, 2014 
Printed Page 283
geocoder.geocode

the assignment var addressComponents = addressComponents; does not make sense, should it be results[0].address_components? (I guess that from the line defining the variable state a few lines below).

That makes it difficult for somebody who is not so sure about that stuff.

Jean-Paul Bardou  Jun 16, 2015 
Printed Page 445
3rd paragraph

I can not figure out the meaning of the 2nd sentence:
"From within the code block where we console.log the request object, we can pull out the user agent property from the request headers. "

Are there some missing words?

Anonymous  Aug 29, 2013