Skip to Main Content
Adobe AIR 1.5 Cookbook
book

Adobe AIR 1.5 Cookbook

by Rich Tretola, David Tucker, Marco Casario, Koen DeWeggheleire, Koen De Weggheleire
November 2008
Beginner to intermediate content levelBeginner to intermediate
446 pages
10h 38m
English
O'Reilly Media, Inc.
Content preview from Adobe AIR 1.5 Cookbook

Chapter 5. HTML Content

Adobe AIR allows a strong integration with HTML content and JavaScript. Thanks to the WebKit open source browser engine embedded in the Adobe runtime, AIR offers a complete and robust HTML renderer and JavaScript interpreter to re-create a browser-like experience. Through the WebKit framework (http://webkit.org/), developers can create an AIR application completely in HTML, JavaScript, DOM, and CSS. In AIR 1.5, the new SquirrelFish JavaScript interpreter from the WebKit project was added. This makes JavaScript code execution extremely fast within AIR.

The core of the HTML and JavaScript environment is represented by the HTMLLoader class, which enables you to specify the HTML content to display in an AIR application. HTMLLoader is part of the flash.html package and is a subclass of the Sprite class that does not implement the UIComponent interface. If you want to use the class in AIR applications created with Flex, you have to extend the UIComponent interface and include an HTMLLoader object.

The HTMLLoader object can also be accessed via JavaScript by using the htmlLoader property of the window object. In HTML windows, the HTMLLoader object contains all the HTML content that is, in turn, contained in a NativeWindow object. Furthermore, the HTMLLoader object provides properties, methods, and events to control how content is loaded and rendered within the AIR application.

When you use HTML content in an application, you need to understand how to interact with ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Breaking Out of the Web Browser with Adobe AIR

Breaking Out of the Web Browser with Adobe AIR

Jeff Tapper, Michael Labriola, Peter Dilillo, Tom Kaczanko, Andriy Kupriyenko, Louie Penaflor, Mike Nimer, Nathan Weber, Steve Zimmers
Adobe AIR Programming Unleashed

Adobe AIR Programming Unleashed

Stacy Tyler Young, Michael Givens, Dimitrios Gianninas

Publisher Resources

ISBN: 9780596156145Supplemental ContentErrata Page