HTML Developer's Guide for Adobe
Total Page:16
File Type:pdf, Size:1020Kb
HTML Developer’s Guide for ADOBE® AIR® Legal notices Legal notices For legal notices, see http://help.adobe.com/en_US/legalnotices/index.html. Last updated 9/28/2011 iii Contents Chapter 1: About the HTML environment Overview of the HTML environment . 2 AIR and WebKit . 5 Chapter 2: Programming HTML and JavaScript in AIR Creating an HTML-based AIR application . 20 An example application and security implications . 21 Avoiding security-related JavaScript errors . 22 Accessing AIR API classes from JavaScript . 27 About URLs in AIR . 29 Embedding SWF content in HTML . 29 Using ActionScript libraries within an HTML page . 32 Converting Date and RegExp objects . 34 Cross-scripting content in different security sandboxes . 34 Chapter 3: Handling HTML-related events in AIR HTMLLoader events . 39 How AIR class-event handling differs from other event handling in the HTML DOM . 40 Adobe AIR event objects . 41 Handling runtime events with JavaScript . 44 Chapter 4: Scripting the AIR HTML Container Display properties of HTMLLoader objects . 47 Accessing the HTML history list . 50 Setting the user agent used when loading HTML content . 50 Setting the character encoding to use for HTML content . 51 Defining browser-like user interfaces for HTML content . 51 Chapter 5: Working with vectors Basics of vectors . 64 Creating vectors . 65 Inserting elements into a vector . 66 Retrieving values and removing vector elements . 66 Properties and methods of Vector objects . 67 Example: Using AIR APIs that require vectors . 67 Chapter 6: AIR security AIR security basics . 69 Installation and updates . 69 HTML security in Adobe AIR . 73 Scripting between content in different domains . 79 Writing to disk . 80 Working securely with untrusted content . 81 Last updated 9/28/2011 HTML DEVELOPER’S GUIDE FOR ADOBE AIR iv Contents Best security practices for developers . 82 Code signing . 83 Chapter 7: Working with AIR native windows Basics of native windows in AIR . 84 Creating windows . 90 Managing windows . 97 Listening for window events . 105 Displaying full-screen windows . 106 Chapter 8: Display screens in AIR Basics of display screens in AIR . ..