Introduction to Apple JavaScript Coding Guidelines

This document provides an overview of the JavaScript language as provided by Apple in the WebKit and JavaScript Core frameworks. It looks at JavaScript language basics, object-oriented programming using JavaScript, and best practices to follow when writing JavaScript code.

Who Should Read This Document?

You should read this document if you are a webpage or Dashboard widget developer who wants to learn JavaScript and best practices for Apple’s JavaScript runtime. Also, this document is useful if you’re using an application that offers a scripting environment that uses Apple’s JavaScript Core framework, like Installer or Quartz Composer.

Organization of This Document

This document contains the following chapters:

Getting WebKit Builds

Safari is powered by the WebKit framework, an open source project found at WebKit.org. To try your web-based JavaScript code with the latest JavaScript language features, download a nightly build from http://nightly.webkit.org/.

See Also

The Reference Library > Apple Applications > Safari provides useful information on WebKit, the technology that provides Apple’s JavaScript runtime. Read WebKit DOM Programming Topics to learn more about the WebKit DOM interfaces, useful when coding a webpage or Dashboard widget.

Read Dashboard Programming Topics for information on the technologies available to you when creating a Dashboard widget. Additional Dashboard documents and sample code can be found in the Reference Library > Apple Applications > Dashboard.

Installer Tiger Examples includes information on using the JavaScript runtime included with Apple’s Installer application.