WebReference.com - Chapter 5 from Creating Applications with Mozilla. From O'Reilly.
Creating Applications with Mozilla
Chapter 5: Scripting Mozilla
In Mozilla, scripting plays important roles in the XPFE. Whether developers refer to script access and security, user interface logic, XPCOM object invocation, or script execution in element event handlers, scripting is so integral to application development that Mozilla, as a development platform, would be inconceivable without it.
The core scripting language used in Mozilla is JavaScript. Although it has had a reputation as an unsophisticated language used mostly in web pages, JavaScript is more like a first-tier programming language. Modularity, good exception handing, regular expression enhancement, and number formatting are just some features of the new JavaScript 1.5,[1] which is based on the ECMA-262 standard.[2] JavaScript 2.0, due sometime late in 2002, promises to be an even bigger promotion of the language.
Three distinct levels of JavaScript are identified in this chapter. A user interface level manipulates content through the DOM, a client layer calls on the services provided by XPCOM, and, finally, an application layer is available in which JavaScript can create an XPCOM component. The following section describes these levels in detail.
Excerpt Contents
- Faces of JavaScript in Mozilla / JavaScript and the DOM
- Adding Scripts to the UI
- XPConnect and Scriptable Components
[Back] This book does not pretend to give a complete overview of JavaScript. You can view the full JavaScript 1.5 reference online at https://developer.netscape.com/docs/manuals/js/core/jsref15/contents.html.
[Back] The third edition of the EMCA-262 EMCAScript Language Specification can be found at https://www.ecma.ch/ecma1/STAND/ECMA-262.HTM.
Created: September 19, 2002
Revised: October 3, 2002
URL: https://webreference.com/programming/javascript/mozillaapps/chap5/