46 | Chapter 3: Working with JavaScript and HTML Within AIR
to having access to the HTML DOM, JavaScript can also
access AIR and Flash Player APIs directly via thewindow.
runtime property. This will be discussed in more detail later.
TIP
For an in-depth introduction and discussion of
JavaScript, check outJavaScript: the Definitive Guide: 5th
Edition, published by O’Reilly:
http://www.oreilly.com/catalog/jscript5/
AIR Implementation of Functionality
HTML and JavaScript functionality is consistent with that
found in other WebKit-based projects and browsers, such as
Apple’s Safari browser. When exploring documentation on
HTML engine / browser functionality, you can use refer-
ences to the Safari browser as an indicator of the functional-
ity available within the HTML environment within AIR.
However, because the HTML engine is running in a run-
time, and not a browser, there are a few differences that are
useful to understand before beginning development with
HTML and JavaScript within Adobe AIR.
Cookies
The Adobe Integrated Runtime has full support for setting
and getting cookies from HTML-based content. Cookie sup-
port is implemented via the operating system’s networking
stack. This means that AIR applications can share cookies set
by any browser or application that also leverage the operat-
ing system stack.
For example. AIR applications can share cookies set through
Internet Explorer on Windows, and Safari on Mac, as they
both also use the operating system’s cookie storage function-
ality. Firefox implements its own cookie storage and thus