|
JavaScript Programmer's Reference
|
To make it easy to navigate through the topics, titles describe the topic content and the topic type
and are organized alphabetically. Where a topic might be referred to using several headings, a brief
entry in the cross-reference at the end of the book shows the main topic for that subject.
I used a great deal of software automation to manage the book content and the whole thing was
built in a database and exported as an XML file set using the DocBook DTD. There are now in
excess of 3500 individual topics in this work. That is more than twice as many as we have room for
in the printed book, so weve had to put a useful subset of the reference into the printed book, and
the complete set of material onto the CD-ROM, which is available both in PDF and HTML formats.
Some additional reference information that is not strictly part of the JavaScript language, but that
you may find useful, is also included, such as country codes and MIME types.
Where we discuss an object all the important properties, methods, events, and any supporting material
are broken out into their own topics, and these detailed entries are included on the CD. Where objects
inherit properties and methods, they are listed in the object coverage, but to avoid duplication the
information about the inherited properties is described as a member of the super-class. This slightly
detracts from the lexical referencing but it saves space. In some cases these inherited
properties/methods are deemed important enough to merit a cross-referencing entry of their own.
This allows us to indicate availability of features at a very fine level of detail. Within each topic we
can also discuss bugs, gotchas, and areas of difficulty in a focused way.
Language syntax is illustrated by way of example code fragments that show how to access an
object, method, or property. More extensive examples are given where necessary.
Because of the scoping rules, properties are available without the need for the window object to be
specified as a prefix. Thus navigator as a topic is available under the window.navigator topic
as well. Once you have found an entry topic, you can then use the cross-referencing listings to
locate other related material.
The book content was developed inside a database system, which provided tools to relate topics.
The benefit is a rich source of cross-referencing links between topics. The cross-reference in the
printed book is complete; that is, it also includes entries found only on the CD. The italicized cross-
references in the printed book can also be found in the printed book.
We will now look at some of the 'features' of JavaScript programming, as an introduction to what
topics in the book will address.
Differences between Browsers
For some time, the most popular browsers have been Netscape Navigator 4.7 and Microsoft
Internet Explorer 5.0 (MSIE). Other, newer browsers make a point of being standards compliant
and so if your script conforms to the standards for core JavaScript as laid down by ECMA and the
W3C DOM specifications, it should function correctly.
However, the dominant browsers have for a long time been competing with one another to add
new features. Architecturally, this means their browsers have each gone in a completely different
direction. The penalty has been that support for various language features has been implemented
in each browser in ways that makes it difficult to use in a portable way. Indeed, to make use of
some features requires twice the work, since the same code has to be written in two different ways
and called after detecting which browser is being used...
Ko'chirish
|
|
|
|