Scripting the AIR HTML Container

Adobe AIR 1.0 and later

The HTMLLoader class serves as the container for HTML content in Adobe® AIR®. The class provides many properties and methods for controlling the behavior and appearance of the HTML content. In addition, the class defines properties and methods for such tasks as loading and interacting with HTML content and managing history.

The HTMLHost class defines a set of default behaviors for an HTMLLoader. When you create an HTMLLoader object, no HTMLHost implementation is provided. Thus when HTML content triggers one of the default behaviors, such as changing the window location, or the window title, nothing happens. You can extend the HTMLHost class to define the behaviors desired for your application.

A default implementation of the HTMLHost is provided for HTML windows created by AIR. You can assign the default HTMLHost implementation to another HTMLLoader object by setting the htmlHost property of the object using a new HTMLHost object created with the defaultBehavior parameter set to true .

The HTMLHost class can only be extended using ActionScript. In an HTML-based application, you can import a compiled SWF file containing an implementation of the HTMLHost class. Assign the host class implementation using the window.htmlLoader property:

<script src="HTMLHostLibrary.swf" type="application/x-shockwave-flash"></script> 
<script> 
    window.htmlLoader.htmlHost = new window.runtime.HTMLHostImplementation(); 
</script>

// Ethnio survey code removed