Errata

Closure: The Definitive Guide

Errata for Closure: The Definitive Guide

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 34
3rd code example on page

This is the section on the "Special @param types"
This example code leaves out some needed closing braces and name of the parameter.
/** * @param {{author: (string|undefined), title: (string|undefined), * numRows: (number|undefined) */
example.createNewSpreadsheetWithRows = function(properties) {

should be:

/** * @param {{author: (string|undefined), title: (string|undefined), * numRows: (number|undefined) }} properties Various optional properties such as author, title, numRows */
example.createNewSpreadsheetWithRows = function(properties) {

Note from the Author or Editor:
Accurately reported.

Erik Neumann  Jan 17, 2013 
Printed
Page 75
2nd paragraph, after code sample

The sentance
"This would make it possible to rewrite goog.string('foobar', 'foo') as 'foobar'.startsWith('foo')"

Should instead read:
"This would make it possible to rewrite goog.string.startsWith('foobar', 'foo') as 'foobar'.startsWith('foo')"

James Bogosian  Jan 21, 2011 
Printed
Page 98
2nd paragraph

The sentence "Although it uses goog.dom.classes.add and goog.dom.classes.remove, goog.dom.classes.enable does have a return value of its own." has a missing "not". It should read "Although it uses goog.dom.classes.add and goog.dom.classes.remove, goog.dom.classes.enable does *not* have a return value of its own."

Note from the Author or Editor:
Nice catch!

Anonymous  Feb 23, 2011 
Printed
Page 111
US

Last paragraph, "Regardless of which side of debate" -> "the debate"?

Antonio Rodriguez  Oct 06, 2010 
Printed, PDF
Page 139
3rd paragraph

The text ", the fourth argument," near the beginning of the third paragraph should be in a regular font (not monospaced).

Anonymous  Nov 23, 2010 
Printed
Page 146

Comment at end of page says "the event system changes it to eventWithNullTarget". Should be eventTarget.

Note from the Author or Editor:
Reporter is correct.

Miguel Lourenco  Aug 22, 2012 
PDF
Page 162
2nd paragraph

The second paragraph says "This id can be used later to abort the request via the manager's setAbort(id, opt_force) method, if desired." The referenced method is in fact "abort(id, opt_force)".

Note from the Author or Editor:
Agreed, thanks for the fix!

setAbort(id, opt_force)

should be changed to:

abort(id, opt_force)

Andy Schmitz  Jan 04, 2011 
Printed
Page 190
United Kingdom

In the top paragraph, "displayInternal()" should be "decorateInternal()"

Note from the Author or Editor:
This is correct -- it should be fixed as reported.

Adam Mcgrath  Jan 19, 2012 
Printed
Page 193
2nd paragraph after the code section

"When removeChild is called with opt_render set to false..." should be "When removeChild is called with opt_unrender set to false...". The removeChild method's second argument is named opt_unrender.

Note from the Author or Editor:
Reported accurately.

Joseph Kaptur  Feb 06, 2013 
Printed
Page 249
Table 9-1, 6th Event Type

the 6th event, DELAYED_CHANGE does not work.

DELAYEDCHANGE is right.

perhaps, update for closure seemed to make a change to this event name from DELAYED_CHANGE to DELAYEDCHANGE.

Note from the Author or Editor:
Good catch -- apparently there are several issues with this table:

DELAYED_CHANGE should be DELAYEDCHANGE
BEFORE_CHANGE should be BEFORECHANGE
BEFORE_FOCUS should be BEFOREFOCUS
BEFORE_TAB should be BEFORETAB
SELECTION_CHANGE should be SELECTION_CHANGE

They need to be updated within the chapter in various places, as well.

Chang Min Jo  Nov 17, 2011 
PDF
Page 251
First line

setModelMode should be setModalMode.

Note from the Author or Editor:
Correct, where it says:

setModelMode/inModalMode

should be changed to:

setModalMode/inModalMode

Andy Schmitz  Oct 05, 2011 
Printed
Page 313
Last Soy expression comment

The last Soy expression comment describes that the expression (the first line on the next page) should evaluates to false if the length of the parameter is 2, but in reality it should be the opposite. The expression should evaluates to true if the length of the parameter is 2 instead.

Note from the Author or Editor:
The reporter is correct. We should change the comment to:

// Evaluates to true if the length of $rows is 2; otherwise, false

Larry Chen  Feb 05, 2013 
Printed
Page 430
1st paragraph

In Eclipse for a Mac, Command-Shift-T launches the "Open Type" dialog, not Option-Shift-T.

Note from the Author or Editor:
Correct, "Option-Shift-T on a Mac" should be "Command-Shift-T on a Mac".

Anonymous  Oct 19, 2010