By Developers, For Developers
| PDF Pg | Paper Pg | Type | Description | Fixed on | Comments |
|---|---|---|---|---|---|
| 20 | TYPO | Fourth paragraph; “bracks” should probably be “brackets” | 2010-10-05 | ||
| 30 | TYPO | last paragraph, “is not weel-suited’ should be ”well-suited" | 2010-10-05 | ||
| 23 | ERROR | The inner function in the “private properties” needs to be executed to return the not so private variable. I chose this approach: (function innerFunc() { | 2010-10-05 | Actually my code works as it, as the wrapped function IS called. Also, the members marked as private (privateField and processInternals) are indeed private: because of the function wrapping and the "var" before privateField, they are absolutely inaccessible from outside scopes. | |
| 21 | TYPO | I think var love = { firstName: ‘Élodie’, lastName: ‘Porteneuve’ }; is invalid json var love = {’firstName’ : ‘Élodie’, ‘lastName’: ‘Porteneuve’ } | 2010-09-16 | Actually this doesn't claim to be JSON, much less valid JSON. Only JSON per-se mandates quoting the key names, as this lets you use reserved words without any special case. \n \nThis also makes the explicit case that JS will systematically handle your object property names as Strings, so key 1 is the same as key '1'. \n \nBut object literals don't mandate quoting at all, when the keys you use are not reserved words (e.g. class). | |
| 89 | TYPO | Tasks overview, first item: | 2010-10-05 | ||
| 68 | SUGGEST | You might want to point out this technique only works for forms that have only a single submit button. Forms with multiple submit buttons append the name and value of the button. Disabling submit buttons makes the browser ignore the submit button pressed and confuses forms which depend on the button name appearing in the HTTP POST/GET parameter list to tell which event is being processed. | 2010-10-05 | This is a very good point; unfortunately, the exigencies of the book's format won't let me add another line to that text page :-/ \n \nI'll be sure to blog about it sometime on the book's site though, especially as there is another way (maintaining submit state in a private hash to cancel events after the first submit call) that doesn't require disabling the button. | |
| 35 | TYPO | “document.observe(‘dom:ready’, fx)” should read “document.observe(‘dom:loaded’, fx)”, correct? | |||
| 112 | TYPO | Sixth line starting from the bottom: The word ‘page’ is probably missing. | |||
| 114 | TYPO | Last ¶: Most of use web developers | |||
| 117 | SUGGEST | Middle of page: | |||
| 31 | TYPO | Y.one(‘#id’).append(’
This gets at top ’) is incorrect, it should be: Y.one(‘#id’).append(’
This gets at bottom ’) | |||
| 119 | SUGGEST | “jQuery is, at the time of this writing, at version 1.4.2.” This was already mentioned at the bottom of the previous page: It seems a bit redundant to state this fact less than 1 page later. Also, the current release is 1.4.4. | |||
| 102 | TYPO | Missing space in the first paragraph of section B.2: “grab Firebug at [URL]or from the Mozilla Add-Ons directory” (at the end of the first URL). | |||
| 98 | TYPO | The top of the JavaScript Cheat Sheet identifies it as the “Pocket Guide to JavaScript’s” cheat sheet rather than the “Pragmatic Guide to JavaScript’s”. | |||
| 98 | SUGGEST | I was hoping the Guide (or at least the Cheat Sheet) would include a reminder of JavaScript’s odd way of defining a new class. Perhaps in a future update? | |||
| 7 | TYPO | JavaScript code in ‘Try this example: “privates properties.”, var publicField = ’foobar’; should be publicField = ‘foobar’; | |||
| 7 | SUGGEST | One of the reported errata is itself possibly incorrect. There reported errata in question is: “#46276: JavaScript code in ‘Try this example: “privates properties.”, var publicField = ’foobar’; should be publicField = ‘foobar’; —Klaus Rohe” The code in the book is correct. Either version (that in the book or that suggested by Klaus) will work. I verified this in a JavaScript console myself. However, the book’s version exports “publicField” by making it a property on the object returned from the anonymous function. The version suggested in the errata report, that of removing the “var” before the definition of the “publicField” variable is unnecessary. In fact, the only effect it has is to make said variable global (in the context in which you run said example). This actually breaks the spirit and intent of the code example and of what the section of the book it trying to demonstrate: keeping your own junk out of the global namespace. Here’s my console session log (executed in the Chrome Browser’s JavaScript Console): > var obj1 = (function() { var privateField = 42; var publicField = ‘foobar’; function processInternals() { alert(‘Internal stuff: ’ + privateField); } ; function run() { processInternals(); alert(‘Still private stuff: ’ + privateField); alert(‘Public stuff: ’ + publicField); } ; return { publicField: publicField, run: run }; })(); |