JavaScript: The Definitive Guide, Fifth Edition by David Flanagan This errata page lists errors corrected in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was updated July 18, 2007. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification (xxi) 2nd paragraph; "His suggestions and technical corrections have make the book clearer and more precise." Should be: "His suggestions and technical corrections have made the book clearer and more precise." (9) near bottom of program example; total.innerHTML = "" Should be: total.innerHTML =""; (106) para 1 (after chapter heading); Superfluous comma after "Chapter 3". (137) first whole paragraph, first sentence; 'rather that as a method' should be: 'rather than as a method' (170): Change the 3rd sentence of 9.5.1 so it begins: "If you have only one level of subclass, you can simplify the syntax..." At the end of the last paragraph of 9.5.1, add the following: Note however that this trick only works with shallow inheritance hierarchies. If B is a subclass of A and C is a subclass of B, and both B and C use this superclass trick, then when you create an instance of C, this.superclass will refer to B(), and the B() constructor will recurse infinitely. For anything other than simple subclasses, use the construtor chaining technique shown in Example 9-3. (143) first sentence; "The facts that Javascript ..." should be "The fact that Javascript ..." (171): At the end of section 9.5.2 add a new paragraph: Again, note that this superclass property can only be used once within an inheritance hierarchy. If a class and a subclass both use this trick, it will cause infinite recursion. (275) code sample, 3rd block; var viewportWidth = window.innerWidth; var viewportHeight = window.innerWidth; Should be: var viewportWidth = window.innerWidth; var viewportHeight = window.innerHeight; (277) First "if" statement top half of page; "documentElemnet" should be "documentElement" (411): Delete the first two sentences of 17.3.2, and replace them with: Although the IE event model provides event details in an Event object, IE only passes an event object to handlers registered with the non-standard attachEvent() method (described below). Other event handlers are invoked with no arguments. Instead of passing the Event object as an argument to the handler, IE makes it available as the event property of the global Window object. (412): Insert the following as the second sentence of the second paragraph of 17.3.3: An event handler registered with attachEvent() will be invoked with a copy of the global window.event event object. (478) footnote, second sentence; "repuration" should be "reputation" (479): Add the following just before the start of 20.1.1: The examples in this section and the rest of the chapter are all part of one larger module. They define utility functions in a namespace (see Chapter 10) named HTTP. None of the examples include the code to actually create this namespace, however. The example download bundle includes a file named http.js that includes this namespace-creation code, and you can simply add the single line var HTTP = {}; to the examples shown here. (503): Add the following right before 21.1.1: These utility functions are intended to be part of one large module, and are all placed in a namespace (see Chapter 10) named XML. The examples shown here do not include code to actually create this namespace, however. The example download bundle includes a file named xml.js that includes this namespace-creation code, and you can simply add the single line var XML = {}; to the examples shown here. (707) 3rd-to-last line on page "This provides a useful alternative to String.substring( ) and String.splice( )" String.splice() should be String.slice() (933) Title line for XMLHttpRequest; Internet Explorer 5.0 should be Internet Explorer 7.0