《JavaScript权威指南(第5版)》英文影印版第一刷勘误
《JavaScript权威指南(第5版)》英文影印版第一刷勘误:
- P137 第3行"rather that as a method"中的"that"改为"than";
- P143 第1句"The facts that JavaScript..."中的"facts"改为"fact";
- P170 9.5.1节中"If you have only one level of subclass, you can simplify the syntax..."加:
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. - P171 9.5.2节结尾加:
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. - P276 Example 14.2中"if(window.screenLeft){ // IE&Others"改为"if(window.screenLeft===undefined){//IE&Others";
- P283 14.4.5节中第4段"then the focus()"的"then"改为"than";
- P355 Table 16.2中"opacity Specifies how opaque (or translucent) and element is."的"and"改为"an";
- P411 17.3.2节前2句改为:
" 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 <literal>attachEvent()</literal> 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 <literal>event</literal> property of the global
Window object." - P412 17.3.3节第2段第2句后插入:
"An event handler registered with <literal>attachEvent()</literal>
will be invoked with a copy of the global
<literal>window.event</literal> event object." - P478 脚注中的"repuration"改为"repuation";
- P479 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 <literal>HTTP</literal>. 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 <literal>var HTTP = {};</literal> to the examples
shown here." - P503 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 <literal>var XML = {};</literal> to
the examples shown here." - P609 deleteCount中"This argument is optional;..."这句改为:"Specify 0 to insert elements without deleting any."。
参考:原书勘误