Chapter 5. JavaScript Core Language Reference


The previous chapters in the reference part of the book have covered every aspect of Dynamic HTML authoring that affects elements, objects, and stylesthe pieces that are often visible on the page. The one part yet to be covered is the scripting glue that makes it possible to access and control the items detailed up to this pointthe "D" of DHTML. This chapter covers the core scripting language features that apply to cross-browser application development. This means that VBScript, ActiveX controls, and Java classes accessible through LiveConnect are intentionally omitted here in favor of the core language that is widely deployed in every scriptable browser.

As described in Online Section I, the JavaScript language was a Netscape invention. Microsoft's version of the language is called JScript. But a browser-neutral version of the language has been approved as a common denominator standard for all JavaScript-derived languages: ECMAScript. There is a great deal of agreement in the implementation of the core elements of this scripting language among browser makers and the ECMA standards group. The biggest challenge for writing core language code (i.e., code that is independent of the scriptable document object model) is knowing what version of the language is supported by which versions of the browser. In the entries for this chapter, you can see at a glance which browser version first supported each core language object, property, method, function, operator, and control statement.

With the increased usage of the type attribute of script elements (over the original language attribute), the JavaScript version is of less importance these days than whether a particular browser supports an object, property, or method. Object detection techniques are much preferred over filtering scripts by JavaScript version number (which is possible via the language attribute). Therefore, JavaScript version numbers are not listed in this chapter for individual items.




Dynamic HTML. The Definitive Reference
Dynamic HTML: The Definitive Reference
ISBN: 0596527403
EAN: 2147483647
Year: 2004
Pages: 120
Authors: Danny Goodman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net