Who Should Read This Document?
Organization of This Document
See Also
JavaScript is a powerful interpreted scripting language designed for embedding into web-based applications. You can use the JavaScript Document Object Model (DOM) in Safari and the WebKit framework to help provide dynamic content to your users, whether you are designing web content, Dashboard widgets, or Cocoa applications.
This document is designed for a number of different audiences:
If you are a web content developer—developing web sites and embedded JavaScript applications—you should read about Safari’s JavaScript support and how scripts operate within WebKit-based applications.
If you are a Cocoa and WebKit developer, you should read about how to integrate JavaScript into your WebKit views and how to enhance your user experience in doing so.
If you are a Dashboard developer, you should read about integrating JavaScript into your widgets to provide a better user experience and more advanced features to your users.
The topic contains the following articles:
“About JavaScript and the DOM” describes the JavaScript language and its implementation in Safari and WebKit.
“Using the Document Object Model From JavaScript” discusses the Document Object Model and how to use it from JavaScript.
“Using the Canvas” describes the canvas object, a critical part of Dashboard but also useful within other WebKit applications.
“Using the Pasteboard From JavaScript” describes how to implement copy and paste functionality within embedded JavaScript applications.
“Using Drag and Drop From JavaScript” describes how to use Mac OS X drag and drop functionality from within Safari and WebKit windows.
“Using XMLHttpRequest” describes how to request data from network resources using the XMLHttpRequest
object.
“Using Objective-C From JavaScript” describes how to use Objective-C in the JavaScript scripting environment, either within a WebKit object or by using a custom browser plug-in.
The Reference Library > Apple Applications > Safari section of the ADC Reference Library provides useful information on WebKit, the technology that provides Apple’s JavaScript runtime. Read JavaScript Coding Guidelines for Mac OS X to learn more about the JavaScript language.
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.
© 2004, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)