Errata

HTML5 Canvas

Errata for HTML5 Canvas

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
12
1st paragraph

Typo in first sentence of first paragraph.
"Finally, we print our test on the screen" test should be text.

James Butler  Jul 28, 2012 
19
2nd paragraph

The Guess The Letter example application was not working properly. It was displaying numbers when pressing character keys on the keyboard and always displaying "This is not a number". After much research, I found that the wrong event was being used in the code in the book and in the downloaded version of the code.
In the book on page 19, 2nd paragraph, the code listing for the initGame() function, the line
"window.addEventListener("keyup", eventKeyPressed, true);" should be
"window.addEventListener("keypress", eventKeyPressed, true);"

Then the application will work properly, showing the letters for character keys and displaying "Not a number" for other keys!.

Note from the Author or Editor:
Again, I really appreciate the effort here. Thanks!

James Butler  Nov 25, 2012 
Printed
Page 181
2nd paragraph

ball.y += yunits should be changed to ball.y -= yunits, otherwise, if you press up it would go down and up if you press down.

Note from the Author or Editor:
Thanks. I think that code got placed in the wrong section. It is describing the movement of the ball to the right and down (+x, +y), not the bounce. I've fixed it in the new version. Thanks!

Anonymous  Nov 11, 2012