| Package | qnx.media |
| Class | public final class QNXStageWebView |
| Inheritance | QNXStageWebView flash.events.EventDispatcher |
QNXStageWebView class enables you to display browsable HTML content in a stage view port.
The QNXStageWebView class provides a comprehensive means to display HTML content on
QNX devices. For example, the QNXStageWebView class provides, methods to pass values or call functions
between ActionScript and JavaScript. You can use the QNXStageWebView class to display and browse content
on the Web, or to load and render local content. The QNXStageWebView
class uses the system web control provided by the device operating system.
The QNXStageWebView class is NOT a display object and cannot be added to the Flash display list.
Instead, to display a QNXStageWebView object, you must attach it directly to the stage using the
stage property. A QNXStageWebView instance that is attached to a stage is displayed on top
of any Flash display objects or behind the stage. There is no way to control the depth ordering of different
QNXStageWebView objects with respect to Flash display objects. However, you may set the zOrder
property to order the QNXStageWebView objects with respect to each other or the stage.
You can control the size and position of the rendering
area by setting the viewPort property.
When the content within the QNXStageWebView object has focus, the QNXStageWebView object has the first
opportunity to handle keyboard input. The stage, to which the QNXStageWebView object is attached,
dispatches any keyboard input that is not handled. The normal event capture/bubble cycle does not
apply here since the QNXStageWebView instance is not part of the display list.
AIR profile support: This feature is supported
only on QNX devices. You can test for support at run time using the
QNXStageWebView.isSupported property. See
AIR Profile Support for more information regarding API support across multiple profiles.
See also
| Property | Defined By | ||
|---|---|---|---|
| active : Boolean
Determines if the browser is active or inactive. | QNXStageWebView | ||
| backgroundColor : uint
Get and set the background color. | QNXStageWebView | ||
| blockPopups : Boolean
Determines whether or not to enable the standard browser popup-blocking engine for generic window.open calls from
Javascript. | QNXStageWebView | ||
| certificateInfo : CertificateInfo [read-only]
Retrieves the certificate information for the currently displayed page. | QNXStageWebView | ||
| contentRectangle : Rectangle [read-only]
The rectangle that defines the size of the content of the web page after transformations
due to user zoom. | QNXStageWebView | ||
| customHTTPHeaders : Vector.<URLRequestHeader>
Defines custom HTTP headers that are sent in addition to the standard headers. | QNXStageWebView | ||
| defaultFontSize : int
Default font size is applied. | QNXStageWebView | ||
| defaultTextEncoding : String
The default text encoding if the browser cannot auto-detect the encoding of the page. | QNXStageWebView | ||
| displayDefaultDialogs : Boolean [write-only]
Sets a Boolean that determines if default dialogs will be displayed. | QNXStageWebView | ||
| enableCookies : Boolean
Determines whether or not cookies should be saved and sent back to pages. | QNXStageWebView | ||
| enableCrossSiteXHR : Boolean
Determines whether or not to allow cross site XHR (XMLHttpRequest). | QNXStageWebView | ||
| enableDownloadableBinaryFonts : Boolean
Enable or disable downloadable binary fonts. | QNXStageWebView | ||
| enableGeolocation : Boolean
Determines whether or not geolocation APIs should be enabled. | QNXStageWebView | ||
| enableJavaScript : Boolean
Determines whether or not to execute Javascript. | QNXStageWebView | ||
| enableLocalAccessToAllCookies : Boolean
Enable or disable access to cookies associated with file: and local: protocols. | QNXStageWebView | ||
| enablePatternMatching : Boolean [write-only]
Enable or disable pattern matching. | QNXStageWebView | ||
| enablePlugins : Boolean
Determines whether or not plugins should be enabled. | QNXStageWebView | ||
| enableResourceFiltering : Boolean
Enables the following events on this webview. | QNXStageWebView | ||
| enableSpatialNavigation : Boolean
Enable or disable spatial navigation. | QNXStageWebView | ||
| enableWebInspector : Boolean
Determines whether or not web inspector should be enabled. | QNXStageWebView | ||
| enableWebSockets : Boolean
Determines whether or not web sockets should be available to pages. | QNXStageWebView | ||
| encryptionInfo : String [read-only]
Retrieves the encryption info for the currently displayed page. | QNXStageWebView | ||
| favicon : BitmapData [read-only]
Gets the favicon for the current page. | QNXStageWebView | ||
| forcedTextEncoding : String
Forced text encoding is applied. | QNXStageWebView | ||
| historyLength : int [read-only]
The length of the history list. | QNXStageWebView | ||
| historyList : Array [read-only]
Retrieves a copy of the history list. | QNXStageWebView | ||
| historyPosition : int
The position of the currently active page in the history list. | QNXStageWebView | ||
| isHistoryBackEnabled : Boolean [read-only]
Determines whether there is a previous page in the browsing history. | QNXStageWebView | ||
| isHistoryForwardEnabled : Boolean [read-only]
Determines whether there is a next page in the browsing history. | QNXStageWebView | ||
| isSupported : Boolean [static] [read-only]
Determines whether the QNXStageWebView class is supported on the current device. | QNXStageWebView | ||
| javaScriptInterruptTimeout : int
Specifies the timeout period (in seconds) after which a long running piece of JavaScript
is interrupted. | QNXStageWebView | ||
| loadImages : Boolean
Determines whether or not to load images when the page is loading. | QNXStageWebView | ||
| loadProgress : int [read-only]
Retrieves the loading progress of the current page. | QNXStageWebView | ||
| location : String [read-only]
The URL of the current location. | QNXStageWebView | ||
| originalLocation : String [read-only]
The URL of the originally entered location before any redirects. | QNXStageWebView | ||
| overScrollColor : uint
Get and set the overscroll color. | QNXStageWebView | ||
| privateBrowsing : Boolean
The private browsing flag tells the QNXStageWebView object to enable private browsing mode. | QNXStageWebView | ||
| scroller : Scroller | QNXStageWebView | ||
| scrollPosition : Point
The current scroll position of the content. | QNXStageWebView | ||
| secureType : String [read-only]
Retrieves the security type for the currently displayed page. | QNXStageWebView | ||
| stage : Stage
The stage on which this QNXStageWebView object is displayed. | QNXStageWebView | ||
| status : String [read-only]
Gets the current status bar content. | QNXStageWebView | ||
| textEncoding : String [read-only]
The current text encoding of the content on the page. | QNXStageWebView | ||
| textReflowMode : String
Get and set the text reflow mode. | QNXStageWebView | ||
| title : String [read-only]
The HTML title value. | QNXStageWebView | ||
| tooltip : String [read-only]
Gets the current tool-tip. | QNXStageWebView | ||
| userAgent : String
The user-agent that is currently reported by the browser to servers during HTTP requests and to web content
in scripts. | QNXStageWebView | ||
| userStyleSheet : String
Specifies a user stylesheet which overrides the stylesheet that is set by the page. | QNXStageWebView | ||
| viewPort : Rectangle
The area on the stage in which the QNXStageWebView object is displayed. | QNXStageWebView | ||
| visible : Boolean
Specifies the visibility property for this QNXStageWebView instance. | QNXStageWebView | ||
| webInspectorPort : int [read-only]
Get the web inspector port number. | QNXStageWebView | ||
| windowUniqueId : String [read-only]
The unique ID of the window. | QNXStageWebView | ||
| zoom : Number
The current zoom factor of the web view. | QNXStageWebView | ||
| zoomCenter : Point The center point of the zoomed area. | QNXStageWebView | ||
| zoomToFitWidthOnLoad : Boolean
Determines if the browser will automatically zoom the page to fit the width of the viewport on load. | QNXStageWebView | ||
| zOrder : int
Specifies the z-order of the QNXStageWebView instance with respect to other windows that are children of
the stage. | QNXStageWebView | ||
| Method | Defined By | ||
|---|---|---|---|
QNXStageWebView(name:String, proxy:QNXWebViewProxy = null)
Creates a QNXStageWebView object. | QNXStageWebView | ||
assignFocus(direction:String = none):void
Assigns focus to the content within this QNXStageWebView object. | QNXStageWebView | ||
clearBrowsingData():void
Clears browsing data. | QNXStageWebView | ||
clearCache():void
Clears the browser cache. | QNXStageWebView | ||
clearCookies():void
Clears any cookie information. | QNXStageWebView | ||
clearHistory():void
Clears all browser history. | QNXStageWebView | ||
clearLocalStorage():void
Clears any local storage. | QNXStageWebView | ||
dispose():void
Disposes of this QNXStageWebView object. | QNXStageWebView | ||
downloadCancel(downloadId:uint):void
Used in conjunction with the Downloadevents. | QNXStageWebView | ||
downloadPause(downloadId:uint):void
Used in conjunction with the Downloadevents. | QNXStageWebView | ||
downloadRemove(downloadId:uint):void
Used in conjunction with the Downloadevents. | QNXStageWebView | ||
downloadResume(downloadId:uint):void
Used in conjunction with the Downloadevents. | QNXStageWebView | ||
downloadRetry(downloadId:uint):void
Used in conjunction with the Downloadevents. | QNXStageWebView | ||
downloadUpdate(downloadId:uint, action:String, filename:String):void
Used in conjunction with the Downloadevents. | QNXStageWebView | ||
drawViewPortToBitmapData(bitmap:BitmapData):void
Draws the QNXStageWebView's view port to a bitmap. | QNXStageWebView | ||
executeJavaScript(script:String):String
Executes the JavaScript code that is specified by script asynchronously. | QNXStageWebView | ||
executeJavaScriptInWorld(script:String, world:String):String
Executes the JavaScript code that is specified by script asynchronously. | QNXStageWebView | ||
findString(string:String, forward:Boolean = true):void
Finds and selects the next/last string that is a case-insensitive
match in the web page. | QNXStageWebView | ||
historyBack():void
Navigates to the previous page in the browsing history. | QNXStageWebView | ||
historyForward():void
Navigates to the next page in the browsing history. | QNXStageWebView | ||
loadFile(path:String, overrideContentType:String):void
Loads the page at the specified file path. | QNXStageWebView | ||
loadString(text:String, mimeType:String = text/html):void
Loads and displays the specified HTML string. | QNXStageWebView | ||
loadStringWithBase(text:String, baseURL:String, mimeType:String = text/html):void
Loads and displays the specified HTML string with the specified baseURL. | QNXStageWebView | ||
loadURL(url:String):void
Loads the page at the specified URL. | QNXStageWebView | ||
notifyResourceDataReceived(streamId:int, data:ByteArray):void
Used in conjunction with the NetworkResourceDataRequested event to substitute the network
stream with custom data and headers. | QNXStageWebView | ||
notifyResourceDone(streamId:int):void
Used in conjunction with the NetworkResourceDataRequested event to substitue the network
stream with custom data and headers. | QNXStageWebView | ||
notifyResourceHeaderReceived(streamId:int, key:String, value:String):void
Used in conjunction with the NetworkResourceDataRequested event to substitute the network
stream with custom data and headers. | QNXStageWebView | ||
notifyResourceOpened(streamId:int, status:int, message:String):void
Used in conjunction with the NetworkResourceDataRequested event to substitute the network
stream with a custom response code. | QNXStageWebView | ||
reload():void
Reloads the current page. | QNXStageWebView | ||
removeGeolocationFilter(url:String):void
Remove the geolocation filter associated with a url. | QNXStageWebView | ||
removeWebGLFilter(url:String):void
Remove the WebGL filter associated with a url. | QNXStageWebView | ||
requestSession():void
Request a web session to be saved. | QNXStageWebView | ||
restoreSession(session:String, restoreScrollPosition:Boolean = true, restoreZoomScale:Boolean = true, restoreUrl:Boolean = true):void
Request a web session to be restored. | QNXStageWebView | ||
scrollBy(dx:int, dy:int):void
Scroll the content by the specified amount (in pixels). | QNXStageWebView | ||
setScrolling(scrolling:Boolean):void
Indicate that the web page is being scrolled or is no longer being scrolled. | QNXStageWebView | ||
stop():void
Halts the current load operation. | QNXStageWebView | ||
textHasAttribute(attribute:String):void
Query the value of a current text attribute. | QNXStageWebView | ||
updateGeolocationFilter(url:String, allow:Boolean):void
Set whether a url is allowed access to geolocation information. | QNXStageWebView | ||
updateWebGLFilter(url:String, allow:Boolean):void
Set whether a url is allowed to use WebGL. | QNXStageWebView | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| QNXStageWebView | ||||
| QNXStageWebView | ||||
| The Event.COMPLETE constant defines the value of the type property of a complete event object. | QNXStageWebView | |||
| Dispatched when content of the page is re-rendered. | QNXStageWebView | |||
| Dispatched when the QNXStageWebView object is created. | QNXStageWebView | |||
| Dispatched when the QNXStageWebView object has been destroyed. | QNXStageWebView | |||
| Dispatched when the application receives a response from the server indicating a location change and page load operation. | QNXStageWebView | |||
| Dispatched when the javascript document.onload event is fired. | QNXStageWebView | |||
| Dispatched when a document load operation fails. | QNXStageWebView | |||
| Dispatched when a document load operation has finished. | QNXStageWebView | |||
| Signals that the download has started. | QNXStageWebView | |||
| Signals that the download has started. | QNXStageWebView | |||
| Signals that a download is about to start. | QNXStageWebView | |||
| Signals that the download has started. | QNXStageWebView | |||
| Indicates that a network error has occurred. | QNXStageWebView | |||
| Defines the value of the type property of a focusIn event object. | QNXStageWebView | |||
| Defines the value of the type property of a focusOut event object. | QNXStageWebView | |||
| Dispatched when the browser (or plugin) has entered full screen mode. | QNXStageWebView | |||
| Dispatched when the browser (or plugin) is about to enter full screen mode. | QNXStageWebView | |||
| Dispatched when the browser (or plugin) has exited full screen mode. | QNXStageWebView | |||
| Signals that the geolocation filter list has been updated. | QNXStageWebView | |||
| Dispatched when a call has been made to the qnx.callExtensionMethod function in JavaScript. | QNXStageWebView | |||
| Dispatched when a JavaScript exception has occurred. | QNXStageWebView | |||
| Dispatched when a long running JavaScript instance has been interrupted. | QNXStageWebView | |||
| Dispatched when the result of a executeJavaScript call has been completed. | QNXStageWebView | |||
| Indicates that the window location has changed, and returns information about what caused the window to change locations. | QNXStageWebView | |||
| Indicates that the window location is changing, and returns information about what caused the window to change locations. | QNXStageWebView | |||
| Dispatched when a network resource is requested. | QNXStageWebView | |||
| Dispatched when the browser requests that a new QNXStageWebView instance should be opened. | QNXStageWebView | |||
| Dispatched when a property of the QNXStageWebView has changed (for any number of reasons). | QNXStageWebView | |||
| Dispatched after a textHasAttribute is received. | QNXStageWebView | |||
| Dispatched when the text input position (caret) changes. | QNXStageWebView | |||
| Dispatched when the selection changes. | QNXStageWebView | |||
| Dispatched when an unknown protocol has been requested that could not be handled by networking. | QNXStageWebView | |||
| Dispatched when an unknown protocol has been requested that could not be handled by the browser. | QNXStageWebView | |||
| Signals that the WebGL filter list has been updated. | QNXStageWebView | |||
| Dispatched when a requestSession call has been completed. | QNXStageWebView | |||
| Signals that the Window object has been cleared and that scripts may now be optinally injected. | QNXStageWebView | |||
| Constant | Defined By | ||
|---|---|---|---|
| ISOLATED_WORLD : String = isolatedWorld [static]
Execute javascript in an isolate world. | QNXStageWebView | ||
| NORMAL_WORLD : String = normalWorld [static]
Execute javascript in the page context. | QNXStageWebView | ||
| NO_WORLD : String = noWorld [static]
Execute javascript with no world. | QNXStageWebView | ||
| SECURITY_TYPE_FAILED : String = securityTypeFailed [static]
All certificates failed to be validated. | QNXStageWebView | ||
| SECURITY_TYPE_FULL : String = securityTypeFull [static]
All page resources using valid certificates. | QNXStageWebView | ||
| SECURITY_TYPE_NONE : String = securityTypeNone [static]
No page resources using security. | QNXStageWebView | ||
| SECURITY_TYPE_PARTIAL : String = securityTypePartial [static]
Some page resources using valid certificates. | QNXStageWebView | ||
| active | property |
active:BooleanDetermines if the browser is active or inactive.
The default value for this property is true.
public function get active():Boolean public function set active(value:Boolean):void| backgroundColor | property |
backgroundColor:uintGet and set the background color.
public function get backgroundColor():uint public function set backgroundColor(value:uint):void| blockPopups | property |
blockPopups:Boolean
Determines whether or not to enable the standard browser popup-blocking engine for generic window.open calls from
Javascript. When this is enabled, only user requested popups will be allowed.
The default value for this property is true.
public function get blockPopups():Boolean public function set blockPopups(value:Boolean):void| certificateInfo | property |
certificateInfo:CertificateInfo [read-only] Retrieves the certificate information for the currently displayed page.
public function get certificateInfo():CertificateInfo| contentRectangle | property |
contentRectangle:Rectangle [read-only] The rectangle that defines the size of the content of the web page after transformations due to user zoom.
public function get contentRectangle():Rectangle| customHTTPHeaders | property |
customHTTPHeaders:Vector.<URLRequestHeader>Defines custom HTTP headers that are sent in addition to the standard headers.
The default value of this property is nul.
public function get customHTTPHeaders():Vector.<URLRequestHeader> public function set customHTTPHeaders(value:Vector.<URLRequestHeader>):void| defaultFontSize | property |
defaultFontSize:intDefault font size is applied.
This is used to override the default font size for the browser. The range is 1 to 120.
The default value is 16.
public function get defaultFontSize():int public function set defaultFontSize(value:int):void| defaultTextEncoding | property |
defaultTextEncoding:StringThe default text encoding if the browser cannot auto-detect the encoding of the page.
The default value of this property is utf-8.
public function get defaultTextEncoding():String public function set defaultTextEncoding(value:String):void| displayDefaultDialogs | property |
displayDefaultDialogs:Boolean [write-only] Sets a Boolean that determines if default dialogs will be displayed.
public function set displayDefaultDialogs(value:Boolean):void| enableCookies | property |
enableCookies:BooleanDetermines whether or not cookies should be saved and sent back to pages.
The default value of this property is true.
public function get enableCookies():Boolean public function set enableCookies(value:Boolean):void| enableCrossSiteXHR | property |
enableCrossSiteXHR:BooleanDetermines whether or not to allow cross site XHR (XMLHttpRequest).
The default value of this property is true.
public function get enableCrossSiteXHR():Boolean public function set enableCrossSiteXHR(value:Boolean):void| enableDownloadableBinaryFonts | property |
enableDownloadableBinaryFonts:BooleanEnable or disable downloadable binary fonts.
public function get enableDownloadableBinaryFonts():Boolean public function set enableDownloadableBinaryFonts(value:Boolean):void| enableGeolocation | property |
enableGeolocation:BooleanDetermines whether or not geolocation APIs should be enabled.
The default value of this property is true.
public function get enableGeolocation():Boolean public function set enableGeolocation(value:Boolean):void| enableJavaScript | property |
enableJavaScript:BooleanDetermines whether or not to execute Javascript.
The default value of this property is true.
public function get enableJavaScript():Boolean public function set enableJavaScript(value:Boolean):void| enableLocalAccessToAllCookies | property |
enableLocalAccessToAllCookies:BooleanEnable or disable access to cookies associated with file: and local: protocols.
public function get enableLocalAccessToAllCookies():Boolean public function set enableLocalAccessToAllCookies(value:Boolean):void| enablePatternMatching | property |
enablePatternMatching:Boolean [write-only] Enable or disable pattern matching. By default this is disabled.
public function set enablePatternMatching(value:Boolean):void| enablePlugins | property |
enablePlugins:BooleanDetermines whether or not plugins should be enabled.
The default value of this property is true.
public function get enablePlugins():Boolean public function set enablePlugins(value:Boolean):void| enableResourceFiltering | property |
enableResourceFiltering:BooleanEnables the following events on this webview.
qnx.events.NetworkResourceDataReceivedEventqnx.events.NetworkResourceDoneEventqnx.events.NetworkResourceHeaderReceivedEventqnx.events.NetworkResourceOpenedEventqnx.events.NetworkResourceRequestedEventfalse.
public function get enableResourceFiltering():Boolean public function set enableResourceFiltering(value:Boolean):void| enableSpatialNavigation | property |
enableSpatialNavigation:BooleanEnable or disable spatial navigation.
public function get enableSpatialNavigation():Boolean public function set enableSpatialNavigation(value:Boolean):void| enableWebInspector | property |
enableWebInspector:BooleanDetermines whether or not web inspector should be enabled.
The default value of this property is false.
public function get enableWebInspector():Boolean public function set enableWebInspector(value:Boolean):void| enableWebSockets | property |
enableWebSockets:BooleanDetermines whether or not web sockets should be available to pages.
The default value of this property is true.
public function get enableWebSockets():Boolean public function set enableWebSockets(value:Boolean):void| encryptionInfo | property |
encryptionInfo:String [read-only] Retrieves the encryption info for the currently displayed page.
public function get encryptionInfo():String| favicon | property |
favicon:BitmapData [read-only] Gets the favicon for the current page.
public function get favicon():BitmapData| forcedTextEncoding | property |
forcedTextEncoding:StringForced text encoding is applied.
This is used to override
a possibly incorrect decision by the browser about the encoding of a page. Set this value to nul
to cancel forcedTextEncoding.
The default value is Nul.
public function get forcedTextEncoding():String public function set forcedTextEncoding(value:String):void| historyLength | property |
historyLength:int [read-only] The length of the history list.
public function get historyLength():int| historyList | property |
historyList:Array [read-only]
Retrieves a copy of the history list. The history list is an Array of
qnx.media.HistoryItem objects. Note that the 0th item is the earliest visited
location.
public function get historyList():Array| historyPosition | property |
historyPosition:intThe position of the currently active page in the history list. Note that 0 is the back of the list.
public function get historyPosition():int public function set historyPosition(value:int):void| isHistoryBackEnabled | property |
isHistoryBackEnabled:Boolean [read-only] Determines whether there is a previous page in the browsing history.
public function get isHistoryBackEnabled():Boolean| isHistoryForwardEnabled | property |
isHistoryForwardEnabled:Boolean [read-only] Determines whether there is a next page in the browsing history.
public function get isHistoryForwardEnabled():Boolean| isSupported | property |
isSupported:Boolean [read-only]
Determines whether the QNXStageWebView class is supported on the current device.
public static function get isSupported():Boolean| javaScriptInterruptTimeout | property |
javaScriptInterruptTimeout:int
Specifies the timeout period (in seconds) after which a long running piece of JavaScript
is interrupted. When JavaScript is interrupted, a WebViewEvent.JAVASCRIPT_INTERRUPTED
event is fired.
The default value for this property is 0 (milliseconds).
public function get javaScriptInterruptTimeout():int public function set javaScriptInterruptTimeout(value:int):void| loadImages | property |
loadImages:Boolean
Determines whether or not to load images when the page is loading. If this value is set to false and you decide to
to load images, then you must set this flag to true and then reload the page.
The default value for this property is true.
public function get loadImages():Boolean public function set loadImages(value:Boolean):void| loadProgress | property |
loadProgress:int [read-only] Retrieves the loading progress of the current page. If the page is fully loaded, this value will remain at 100.
public function get loadProgress():int| location | property |
location:String [read-only] The URL of the current location.
public function get location():String| originalLocation | property |
originalLocation:String [read-only] The URL of the originally entered location before any redirects.
public function get originalLocation():String| overScrollColor | property |
overScrollColor:uintGet and set the overscroll color.
public function get overScrollColor():uint public function set overScrollColor(value:uint):void| privateBrowsing | property |
privateBrowsing:Boolean
The private browsing flag tells the QNXStageWebView object to enable private browsing mode.
Existing cookies are not used and no browsing information is saved.
The default value of this property is false.
public function get privateBrowsing():Boolean public function set privateBrowsing(value:Boolean):void| scroller | property |
scroller:Scroller public function get scroller():Scroller public function set scroller(value:Scroller):void| scrollPosition | property |
scrollPosition:PointThe current scroll position of the content. If you set a value that extends past the edge of the content, the value will be clamped to the proper value.
public function get scrollPosition():Point public function set scrollPosition(value:Point):void| secureType | property |
secureType:String [read-only] Retrieves the security type for the currently displayed page.
public function get secureType():String| stage | property |
stage:Stage
The stage on which this QNXStageWebView object is displayed.
Set stage to nul to hide this QNXStageWebView object, or
change the visible property to false.
mySwv = new QNXStageWebView("myBrowser");
mySwv.stage = this.stage;
public function get stage():Stage public function set stage(value:Stage):void| status | property |
status:String [read-only] Gets the current status bar content.
public function get status():String| textEncoding | property |
textEncoding:String [read-only] The current text encoding of the content on the page.
If you have not set a forced text encoding, this value will be either the auto-detected text encoding, or the default text encoding. Otherwise, it is the forced text encoding.
public function get textEncoding():String| textReflowMode | property |
textReflowMode:StringGet and set the text reflow mode.
public function get textReflowMode():String public function set textReflowMode(value:String):void| title | property |
title:String [read-only] The HTML title value.
public function get title():String| tooltip | property |
tooltip:String [read-only] Gets the current tool-tip.
public function get tooltip():String| userAgent | property |
userAgent:StringThe user-agent that is currently reported by the browser to servers during HTTP requests and to web content in scripts.
The default value is system-dependant.
public function get userAgent():String public function set userAgent(value:String):void| userStyleSheet | property |
userStyleSheet:String
Specifies a user stylesheet which overrides the stylesheet that is set by the page.
To specify the stylesheet inline, use a data:// URL. Set the url argument to nul to clear the user
stylesheet.
public function get userStyleSheet():String public function set userStyleSheet(value:String):void| viewPort | property |
viewPort:Rectangle
The area on the stage in which the QNXStageWebView object is displayed.
mySwv = new QNXStageWebView("myBrowser");
mySwv.viewPort = new Rectangle(50,50,400,400);
public function get viewPort():Rectangle public function set viewPort(value:Rectangle):void| visible | property |
visible:Boolean
Specifies the visibility property for this QNXStageWebView instance.
The default value for this property is false.
public function get visible():Boolean public function set visible(value:Boolean):void| webInspectorPort | property |
webInspectorPort:int [read-only] Get the web inspector port number.
public function get webInspectorPort():int| windowUniqueId | property |
windowUniqueId:String [read-only] The unique ID of the window.
This value can be used with the qnx.display.IowWindow class to retrieve the
underlying window. While you can set any property on the window, you should not resize the viewport as this will
cause the QNXStageWebView insatnce to fail. This value is constant through the life of a QNXStageWebView but will be
regenerated every time you create a new one.
public function get windowUniqueId():String| zoom | property |
zoom:NumberThe current zoom factor of the web view.
public function get zoom():Number public function set zoom(value:Number):void| zoomCenter | property |
zoomCenter:PointThe center point of the zoomed area. When this is non-null zooming is done by scaling the existing content without re-rendering. Setting to null causes the content to be rendered at the current zoom factor.
public function get zoomCenter():Point public function set zoomCenter(value:Point):void| zoomToFitWidthOnLoad | property |
zoomToFitWidthOnLoad:BooleanDetermines if the browser will automatically zoom the page to fit the width of the viewport on load.
The default value for this property is true.
public function get zoomToFitWidthOnLoad():Boolean public function set zoomToFitWidthOnLoad(value:Boolean):void| zOrder | property |
zOrder:int
Specifies the z-order of the QNXStageWebView instance with respect to other windows that are children of
the stage.
The stage always has a z-order of 0 with respect to children. Windows are painted by
the window manager from lowest z-order (backmost) to highest z-order (frontmost). Thus, specifying a value
less than 0 will move the QNXStageWebView instance behind the stage (and can be seen through the stage if the
stage is not opaque where the QNXStageWebView instance is being displayed). Specifying a value greater than or
equal to 0 will move the QNXStageWebView in front of the stage. You must manage the z-order of QNXStageWebView
objects if you have more than one, or need to use a special case such as moving behind the stage.
The default value for this property is 0.
In the following listing, the zOrder property of a QNXStageWebView instance is set to -1 (hidden behind the stage) while the
class is loading an external URL. When the external content is loaded, the onLoad function is called and the zOrder property is set
to 0, which causes the QNXStageWebView to appear in front of the stage and visible to the user.
mySwv = new QNXStageWebView("myBrowser");
mySwv.stage = this.stage;
mySwv.viewPort = new Rectangle(50,50,400,400);
mySwv.addEventListener(WebViewEvent.DOCUMENT_LOAD_FINISHED, onLoad);
mySwv.addEventListener(WebViewEvent.DOCUMENT_LOAD_FAILED, onFail);
mySwv.loadURL("http://www.qnx.com/");
mySwv.zOrder = -1;
private function onLoad(e:WebViewEvent):void
{
mySwv.zOrder = 0;
}
public function get zOrder():int public function set zOrder(value:int):void| QNXStageWebView | () | Constructor |
public function QNXStageWebView(name:String, proxy:QNXWebViewProxy = null)
Creates a QNXStageWebView object.
The object is invisible until it is attached to a stage and until the viewPort
is set.
name:String | |
proxy:QNXWebViewProxy (default = null) |
| assignFocus | () | method |
public function assignFocus(direction:String = none):void
Assigns focus to the content within this QNXStageWebView object.
Direction values are defined in FocusDirection class and include:
Parameters
direction:String (default = none) — A String that specifies whether the first or last focusable object
in the displayed content list should receive focus.
|
| clearBrowsingData | () | method |
public function clearBrowsingData():void
Clears browsing data.
The following types of data are cleared:
| clearCache | () | method |
public function clearCache():voidClears the browser cache.
| clearCookies | () | method |
public function clearCookies():voidClears any cookie information.
| clearHistory | () | method |
public function clearHistory():voidClears all browser history.
| clearLocalStorage | () | method |
public function clearLocalStorage():voidClears any local storage.
| dispose | () | method |
public function dispose():void
Disposes of this QNXStageWebView object.
Calling dispose() is optional. If you do not maintain a reference to this
QNXStageWebView instance it will be eligible for garbage collection. Calling dispose()
can make garbage collection occur sooner, or at a more convenient time.
| downloadCancel | () | method |
public function downloadCancel(downloadId:uint):voidUsed in conjunction with the Downloadevents. Call this function to cancel a download in the download manager. The download will remain in the download manager until removed.
Parameters
downloadId:uint — The download specified in the event.
|
| downloadPause | () | method |
public function downloadPause(downloadId:uint):voidUsed in conjunction with the Downloadevents. Call this function to pause a download in the download manager.
Parameters
downloadId:uint — The download specified in the event.
|
| downloadRemove | () | method |
public function downloadRemove(downloadId:uint):voidUsed in conjunction with the Downloadevents. Call this function to remove a download from the download manager. If the download is still in progress it will be cancelled.
Parameters
downloadId:uint — The download specified in the event.
|
| downloadResume | () | method |
public function downloadResume(downloadId:uint):voidUsed in conjunction with the Downloadevents. Call this function to resume a paused download in the download manager.
Parameters
downloadId:uint — The download specified in the event.
|
| downloadRetry | () | method |
public function downloadRetry(downloadId:uint):voidUsed in conjunction with the Downloadevents. Call this function to retry a download in the download manager. If the download is already running it will not be affected.
Parameters
downloadId:uint — The download specified in the event.
|
| downloadUpdate | () | method |
public function downloadUpdate(downloadId:uint, action:String, filename:String):voidUsed in conjunction with the Downloadevents. Call this function to set the download action to take for a pending download.
Parameters
downloadId:uint — The download specified in the event.
| |
action:String — The action to take from WebDownloadRequestEvent::ACTION_ | |
filename:String — The name to save the file as if the aciton is save. Must not be null or empty.
|
| drawViewPortToBitmapData | () | method |
public function drawViewPortToBitmapData(bitmap:BitmapData):voidDraws the QNXStageWebView's view port to a bitmap.
Parameters
bitmap:BitmapData — The BitmapData object on which to draw the visible portion of the QNXStageWebView's view port.
|
Error — The bitmap is null.
|
| executeJavaScript | () | method |
public function executeJavaScript(script:String):String
Executes the JavaScript code that is specified by script asynchronously.
This function will immediately return a unique identifier for this executeJavaScript() call and
JavaScript code block/line. After the code has completed execution (successfully or otherwise)
a JavaScriptResultEvent.JAVASCRIPT_RESULT event is fired containing the unique ID
of the executeJavaScript() call and the result that was returned (which may be an empty string).
Javascript is executed in the NORMAL WORLD
Parameters
script:String — Specifies the block of JavaScript that will be executed.
|
String |
See also
| executeJavaScriptInWorld | () | method |
public function executeJavaScriptInWorld(script:String, world:String):String
Executes the JavaScript code that is specified by script asynchronously.
This function will immediately return a unique identifier for this executeJavaScript() call and
JavaScript code block/line. After the code has completed execution (successfully or otherwise)
a JavaScriptResultEvent.JAVASCRIPT_RESULT event is fired containing the unique ID
of the executeJavaScript() call and the result that was returned (which may be an empty string).
Parameters
script:String — Specifies the block of JavaScript that will be executed.
| |
world:String (default = NaN) — Sepecifies the JavascriptWorld the script will be executed in. The default is the NORMAL_WORLD
|
String |
| findString | () | method |
public function findString(string:String, forward:Boolean = true):voidFinds and selects the next/last string that is a case-insensitive match in the web page. It will wrap the web page if it reaches the end. An empty String will result in no match and no selection.
This event will fire a FindStringEvent event after the search iss complete.
Parameters
string:String — The String specifying the text to find.
| |
forward:Boolean (default = true) — true if searching forward, or false if backwards.
|
See also
| historyBack | () | method |
public function historyBack():voidNavigates to the previous page in the browsing history.
| historyForward | () | method |
public function historyForward():voidNavigates to the next page in the browsing history.
| loadFile | () | method |
public function loadFile(path:String, overrideContentType:String):void
Loads the page at the specified file path. This function is very similar to calling
loadURL with a file: URL, except an override content type
can be specified.
Parameters
path:String — The full path of the file to be loaded, prefixed by file://
| |
overrideContentType:String — Optional content type to force WebKit to use
|
| loadString | () | method |
public function loadString(text:String, mimeType:String = text/html):voidLoads and displays the specified HTML string.
When the loadString() method is used, the location
is reported as "about:blank." Only standard URI schemes can be used in URLs within
the HTML string. The AIR URI schemes, "app:" and "app-storage:" are not allowed.
The HTML content cannot load local resources, such as image files. XMLHttpRequests are not allowed.
Only the "text/html" and "application/xhtml+xml" MIME types are supported.
Parameters
text:String — The string of HTML or XHTML content to display.
| |
mimeType:String (default = text/html) — The MIME type of the content, either "text/html" or "application/xhtml+xml".
|
| loadStringWithBase | () | method |
public function loadStringWithBase(text:String, baseURL:String, mimeType:String = text/html):voidLoads and displays the specified HTML string with the specified baseURL.
Parameters
text:String — The String of HTML or XHTML content to display.
| |
baseURL:String — The String of the URL that this content is reported to come from.
| |
mimeType:String (default = text/html) — The MIME type of the content.
|
| loadURL | () | method |
public function loadURL(url:String):voidLoads the page at the specified URL.
The URL can use the following URI schemes:
Content loaded with the file: scheme can load other local resources.
The following listing loads an external URL.
mySwv = new QNXStageWebView("myBrowser");
mySwv.stage = this.stage;
mySwv.viewPort = new Rectangle(50,50,400,400);
mySwv.addEventListener(WebViewEvent.DOCUMENT_LOAD_FINISHED, onLoad);
mySwv.addEventListener(WebViewEvent.DOCUMENT_LOAD_FAILED, onFail);
mySwv.loadURL("http://www.qnx.com/");
Parameters
url:String — The URL of the content to display.
|
| notifyResourceDataReceived | () | method |
public function notifyResourceDataReceived(streamId:int, data:ByteArray):void
Used in conjunction with the NetworkResourceDataRequested event to substitute the network
stream with custom data and headers. Send all data before notifyResourceDone, but after
notifyResourceOpened and notifyResourceHeaderReceived.
This function simulates data being received from the server.
Parameters
streamId:int — The stream specified in the event.
| |
data:ByteArray — The raw stream of bytes to be loaded by the browser.
|
| notifyResourceDone | () | method |
public function notifyResourceDone(streamId:int):void
Used in conjunction with the NetworkResourceDataRequested event to substitue the network
stream with custom data and headers. Should only be called last, after notifyResourceOpened
notifyResourceHeaderReceived and notifyResourceDataReceived. After this function is called
the streamId is no longer valid and should be discarded.
This function simulates data being received from the server.
Parameters
streamId:int — The stream specified in the event.
|
| notifyResourceHeaderReceived | () | method |
public function notifyResourceHeaderReceived(streamId:int, key:String, value:String):void
Used in conjunction with the NetworkResourceDataRequested event to substitute the network
stream with custom data and headers. Send all headers before notifyResourceDataReceived
and notifyResourceDone, but after notifyResourceOpened.
This function simulates the result response from the server.
Parameters
streamId:int — The stream specified in the event.
| |
key:String — The name of the header property.
| |
value:String — The value of the header property.
|
| notifyResourceOpened | () | method |
public function notifyResourceOpened(streamId:int, status:int, message:String):void
Used in conjunction with the NetworkResourceDataRequested event to substitute the network
stream with a custom response code. Call this function first when substituting.
This function simulates the result response from the server.
Parameters
streamId:int — The stream specified in the event.
| |
status:int — The HTTP status code to return to the browser.
| |
message:String — The message to return to the browser.
|
| reload | () | method |
public function reload():void
Reloads the current page. You should only invoke reload() when you
load your source HTML using loadURL() or loadFile(). The
reload() method may throw an error if you loaded your source HTML using
loadString() or loadStringWithBase().
| removeGeolocationFilter | () | method |
public function removeGeolocationFilter(url:String):voidRemove the geolocation filter associated with a url. This will cause the user to be prompted if the site requests geolocation information.
Parameters
url:String |
| removeWebGLFilter | () | method |
public function removeWebGLFilter(url:String):voidRemove the WebGL filter associated with a url. This will cause the user to be prompted if the site uses WebGL.
Parameters
url:String |
| requestSession | () | method |
public function requestSession():voidRequest a web session to be saved. A WebSessionInfo event will be dispatched by WebKit to pass up information about the session, so that it can be restored later.
| restoreSession | () | method |
public function restoreSession(session:String, restoreScrollPosition:Boolean = true, restoreZoomScale:Boolean = true, restoreUrl:Boolean = true):voidRequest a web session to be restored.
Parameters
session:String — Information about the session to be restored.
| |
restoreScrollPosition:Boolean (default = true) — Optional parameter to enable restore of scroll position (default: true)
| |
restoreZoomScale:Boolean (default = true) — Optional parameter to enable restore of zoom scale (default: true)
| |
restoreUrl:Boolean (default = true) — Optional parameter to enable restore of url (default: true)
|
| scrollBy | () | method |
public function scrollBy(dx:int, dy:int):voidScroll the content by the specified amount (in pixels).
You may pass negative amounts here. If the amount passed exceeds the edge of the content, the scroll will stop at the edge of the content automatically. This function does not animate the scroll, scroll is moved to the new position as soon as possible.
Parameters
dx:int — The distance to scroll horizontally.
| |
dy:int — The distance to scroll vertically.
|
| setScrolling | () | method |
public function setScrolling(scrolling:Boolean):voidIndicate that the web page is being scrolled or is no longer being scrolled. While being scrolled rendering is turned off to ensure it is smooth.
Parameters
scrolling:Boolean — true if the page is being scrolled.
|
| stop | () | method |
public function stop():voidHalts the current load operation.
| textHasAttribute | () | method |
public function textHasAttribute(attribute:String):void
Query the value of a current text attribute. The result of the query
will come in the form of a TextAttributeQueryEvent.
Parameters
attribute:String — The name of the attribute to be queried.
|
| updateGeolocationFilter | () | method |
public function updateGeolocationFilter(url:String, allow:Boolean):voidSet whether a url is allowed access to geolocation information. If a filter is not set for a site the user is prompted.
Parameters
url:String | |
allow:Boolean |
| updateWebGLFilter | () | method |
public function updateWebGLFilter(url:String, allow:Boolean):voidSet whether a url is allowed to use WebGL. If a filter is not set for a site the user is prompted.
Parameters
url:String | |
allow:Boolean |
| clipboardRead | Event |
qnx.events.ClipboardEventqnx.events.ClipboardEvent.CLIPBOARD_READ
| clipboardWrite | Event |
qnx.events.ClipboardEventqnx.events.ClipboardEvent.CLIPBOARD_WRITE
| complete | Event |
flash.events.Event
The Event.COMPLETE constant defines the value of the type property of a complete event object.
| contentRendered | Event |
qnx.events.ContentRenderedEventqnx.events.ContentRenderedEvent.CONTENT_RENDEREDDispatched when content of the page is re-rendered. The changeRect property of the event indicates the re-rendered rectangle.
| created | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.CREATEDDispatched when the
QNXStageWebView object is created.
| destroyed | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.DESTROYEDDispatched when the
QNXStageWebView object has been destroyed.
| documentLoadCommitted | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.DOCUMENT_LOAD_COMMITTEDDispatched when the application receives a response from the server indicating a location change and page load operation. After this event is fired, you must call
back
to get back to the old page. Calling stop will interrupt the loading of this page,
and will leave the page in its state at the time of the stop call.
| documentLoaded | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.DOCUMENT_LOADEDDispatched when the javascript
document.onload event is fired. This event will be fired
after a given timeout period expires, even if the qnx.events.WebViewEvent.DOCUMENT_LOAD_FINISHED
event is never fired.
| documentLoadFailed | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.DOCUMENT_LOAD_FAILEDDispatched when a document load operation fails.
| documentLoadFinished | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.DOCUMENT_LOAD_FINISHEDDispatched when a document load operation has finished. This event may never be sent as it is possible for a page to never complete loading.
| downloadFinished | Event |
qnx.events.WebDownloadFinishedEventqnx.events.WebDownloadFinishedEvent.DOWNLOAD_FINISHEDSignals that the download has started.
| downloadProgress | Event |
qnx.events.WebDownloadProgressEventqnx.events.WebDownloadProgressEvent.DOWNLOAD_PROGRESSSignals that the download has started.
| downloadRequest | Event |
qnx.events.WebDownloadRequestEventqnx.events.WebDownloadRequestEvent.DOWNLOAD_REQUESTSignals that a download is about to start. You must set the action that you wish to take in response to this event. The default action is to discard the download.
| downloadStarted | Event |
qnx.events.WebDownloadStartedEventqnx.events.WebDownloadStartedEvent.DOWNLOAD_STARTEDSignals that the download has started.
| error | Event |
qnx.events.NetworkErrorEventqnx.events.NetworkErrorEvent.ERRORIndicates that a network error has occurred.
| focusIn | Event |
flash.events.FocusEventDefines the value of the type property of a focusIn event object.
See also
| focusOut | Event |
flash.events.FocusEventDefines the value of the type property of a focusOut event object.
See also
| fullScreenEnter | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.FULL_SCREEN_ENTERDispatched when the browser (or plugin) has entered full screen mode. You may stop any animations or processes that the user does not need to unload the CPU while the application is in fullscreen mode.
| fullScreenEntering | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.FULL_SCREEN_ENTERINGDispatched when the browser (or plugin) is about to enter full screen mode. Cancel this event to prevent it from entering fullscreen.
| fullScreenExit | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.FULL_SCREEN_EXITDispatched when the browser (or plugin) has exited full screen mode.
| geolocationFilterUpdated | Event |
qnx.events.WebFilterUpdatedEventqnx.events.WebFilterUpdatedEvent.GEOLOCATION_FILTER_UPDATEDSignals that the geolocation filter list has been updated.
| javaScriptCallback | Event |
qnx.events.JavaScriptCallbackEventqnx.events.JavaScriptCallbackEvent.JAVA_SCRIPT_CALLBACKDispatched when a call has been made to the
qnx.callExtensionMethod function in JavaScript.
The QNXStageWebView object will automatically return the contents of the
result member (default null) unless you cancel this event. In that
case you must call sendJavaScriptCallbackReturnValue with the
result, the browser will wait and no further javaScriptCallback events will be received
until sendJavaScriptCallbackReturnValue is called.
The following listing shows a javascript function (in a web page) that calls the
qnx.callExtensionMethod() function:
<script type="text/javascript">
function close(){
qnx.callExtensionMethod("name","val1","val2");
//must have a parameter or else the event is not thrown, no includes are needed
}
</script>
Below, a callback function (in an actionscript class) is set up to capture the name and result of the javascript function.
webview.addEventListener(JavaScriptCallbackEvent.JAVA_SCRIPT_CALLBACK,function(event:JavaScriptCallbackEvent):void{
trace("callback complete");
trace("js name: " + event.name);//first parameter that was given
trace("js result: " + event.result);//null for the moment
for each(var object:String in event.params){
//rest of the parameters
trace(object);
}
}
| javaScriptException | Event |
qnx.events.JavaScriptExceptionEventqnx.events.JavaScriptExceptionEvent.JAVA_SCRIPT_EXCEPTIONDispatched when a JavaScript exception has occurred. The event contains the exception String, line number, and file where the exception occurred. This event cannot be cancelled.
| javaScriptInterrupted | Event |
qnx.events.WebViewEventqnx.events.WebViewEvent.JAVA_SCRIPT_INTERRUPTEDDispatched when a long running JavaScript instance has been interrupted. To increase the timeout, set the
javaScriptInterruptTimeout property.
| javaScriptResult | Event |
qnx.events.JavaScriptResultEventqnx.events.JavaScriptResultEvent.JAVA_SCRIPT_RESULTDispatched when the result of a
executeJavaScript call has been completed.
The uniqueId property of the event contains the uniqueId string that was
returned from the executeJavaScript call.
| locationChange | Event |
qnx.events.ExtendedLocationChangeEventqnx.events.ExtendedLocationChangeEventIndicates that the window location has changed, and returns information about what caused the window to change locations.
| locationChanging | Event |
qnx.events.ExtendedLocationChangeEventqnx.events.ExtendedLocationChangeEventIndicates that the window location is changing, and returns information about what caused the window to change locations.
| networkResourceRequested | Event |
qnx.events.NetworkResourceRequestedEventqnx.events.NetworkResourceRequestedEvent.NETWORK_RESOURCE_REQUESTEDDispatched when a network resource is requested. The URL of the resource is contained in the
url property of the event.
Specify the action you wish to take for this resource:
NetworkResourceRequestedEvent.ACTION_ACCEPT: (Default) Load the resource.NetworkResourceRequestedEvent.ACTION_DENY: Abort loading this resource.NetworkResourceRequestedEvent.ACTION_FILTER: Filter the resource loading, further events will be received for each stage of the open and data can be substited or monitored at that time.NetworkResourceRequestedEvent.ACTION_SUBSTITUTE: Substitute the entire load with your own data. Must call NetworkResourceOpened, NetworkResourceDone, NetworkResourceHeaderReceived and NetworkResourceDataReceived with the m_streamId in this event.| openWindow | Event |
qnx.events.OpenWindowEventqnx.events.OpenWindowEvent.OPEN_WINDOWDispatched when the browser requests that a new
QNXStageWebView instance should be opened. The
URL property specifies the URL for the QNXStageWebView instance. The name
property indicates the name of the window. If a window with the specified name already exists, the window
will be reused, otherwise a new window will be created.
| propertyChanged | Event |
qnx.events.PropertyChangedEventqnx.events.PropertyChangedEvent.PROPERTY_CHANGEDDispatched when a property of the
QNXStageWebView has changed (for any number of reasons).
The name of the property is stored in the name property of the event.
| textAttributeQuery | Event |
qnx.events.TextAttributeQueryEventqnx.events.TextAttributeQueryEvent.TEXT_ATTRIBUTE_QUERYDispatched after a
textHasAttribute is received. The attribute and
value properties of the event contain the results of the query.
Note that for many attributes the value string will be either "true" or "false"
indicating whether the attribute is present or not. For example, the text attribute
"bold" will have a value of "true" or "false", but the attribute "fontName" will
have an actual font name as its value. If an attribute is queried which does not
exist, its value will be the empty string.
| textCaretChanged | Event |
qnx.events.TextCaretChangedEventqnx.events.TextCaretChangedEvent.TEXT_CARET_CHANGEDDispatched when the text input position (caret) changes. The caretRect property of the event indicates the caret position. The userTouch property indicates whether the change was due to user touch input.
| textSelectionChanged | Event |
qnx.events.TextSelectionChangedEventqnx.events.TextSelectionChangedEvent.TEXT_SELECTION_CHANGEDDispatched when the selection changes. The startRect and endRect properties of the event indicate the caret position of the start and end of the selection. NOTE: The selected region is not bounded by these parameters.
| unknownProtocol | Event |
qnx.events.UnknownProtocolEventqnx.events.UnknownProtocolEvent.UNKNOWN_PROTOCOLDispatched when an unknown protocol has been requested that could not be handled by networking. The url property of the event indicates the target URL. The
streamId
property indicates the stream.
Cancelling this event allows the stream to be filtered using the notifyResourcefunctions. Otherwise, the resource load operation will fail.
| unsupportedMimeType | Event |
qnx.events.UnsupportedMimeTypeEventqnx.events.UnsupportedMimeTypeEvent.UNSUPPORTED_MIME_TYPEDispatched when an unknown protocol has been requested that could not be handled by the browser.
| webGLFilterUpdated | Event |
qnx.events.WebFilterUpdatedEventqnx.events.WebFilterUpdatedEvent.WEBGL_FILTER_UPDATEDSignals that the WebGL filter list has been updated.
| webSessionInfo | Event |
qnx.events.WebSessionInfoEventqnx.events.WebSessionInfoEvent.WEB_SESSION_INFODispatched when a
requestSession call has been completed.
The version property of the event helps in parsing the session data string.
The data property is a string containing all required information about
a web session, and can be used to identify it uniquely in a restoreSession call.
| WindowObjectCleared | Event |
qnx.events.WindowObjectClearedEventqnx.events.WindowObjectClearedEvent.WINDOW_OBJECT_CLEAREDSignals that the
Window object has been cleared and that scripts may now be
optinally injected. Set the scripts property to the javascript that should be
injected and optionally executed.
| ISOLATED_WORLD | Constant |
public static const ISOLATED_WORLD:String = isolatedWorldExecute javascript in an isolate world. Scripts execute in a special environment called an isolated world. They have access to the DOM of the page they are injected into, but not to any JavaScript variables or functions created by the page. It looks to each content script as if there is no other JavaScript executing on the page it is running on. The same is true in reverse: JavaScript running on the page cannot call any functions or access any variables defined by content scripts. Isolated worlds allow each content script to make changes to its JavaScript environment without worrying about conflicting with the page or with other content scripts. For example, a content script could include JQuery v1 and the page could include JQuery v2, and they wouldn't conflict with each other.
See also
| NO_WORLD | Constant |
public static const NO_WORLD:String = noWorldExecute javascript with no world. The javascript will have no access to the DOM.
| NORMAL_WORLD | Constant |
public static const NORMAL_WORLD:String = normalWorldExecute javascript in the page context. Any variables or functions defined will be available to the page. This is the default behavior of the executeJavaScript call.
| SECURITY_TYPE_FAILED | Constant |
public static const SECURITY_TYPE_FAILED:String = securityTypeFailedAll certificates failed to be validated.
| SECURITY_TYPE_FULL | Constant |
public static const SECURITY_TYPE_FULL:String = securityTypeFullAll page resources using valid certificates.
| SECURITY_TYPE_NONE | Constant |
public static const SECURITY_TYPE_NONE:String = securityTypeNoneNo page resources using security.
| SECURITY_TYPE_PARTIAL | Constant |
public static const SECURITY_TYPE_PARTIAL:String = securityTypePartialSome page resources using valid certificates. Some resources have invalid or no secure connection.
QNXStageWebView instance to the stage. It uses
a percentage bar control to alert the user that a page is currently being loaded.
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.TimerEvent;
import flash.geom.Rectangle;
import flash.utils.Timer;
import qnx.events.WebViewEvent;
import qnx.media.QNXStageWebView;
import qnx.ui.events.
import qnx.ui.progress.PercentageBar;
[SWF(height="600", width="1024", frameRate="30", backgroundColor="#FFFFFF")]
public class MyStageWeb extends Sprite
{
private var mySwv:QNXStageWebView;
private var myProgress:PercentageBar;
private var timer:Timer;
public function MyStageWeb()
{
initializeUI();
}
public function initializeUI():void
{
timer = new Timer(500);
timer.addEventListener(TimerEvent.TIMER,handleTimerTick);
timer.start();
mySwv = new QNXStageWebView("myBrowser");
mySwv.stage = this.stage;
mySwv.viewPort = new Rectangle(50,50,400,400);
mySwv.addEventListener(WebViewEvent.DOCUMENT_LOAD_FINISHED, onLoad);
mySwv.addEventListener(WebViewEvent.DOCUMENT_LOAD_FAILED, onFail);
mySwv.loadURL("http://www.qnx.com/");
mySwv.scrollBy(100,100);
mySwv.zoomToFitWidthOnLoad = true;
mySwv.blockPopups = true;
mySwv.zOrder = -1;
myProgress = new PercentageBar();
myProgress.x = (400-myProgress.width) /2;
myProgress.y = (500-myProgress.height) /2;
myProgress.width = 200;
this.addChild(myProgress);
}
private function handleTimerTick(e:Event):void
{
myProgress.progress = mySwv.loadProgress/100;
}
private function onLoad(e:WebViewEvent):void
{
myProgress.progress = 1;
mySwv.zOrder = 0;
myProgress.destroy();
}
private function onFail(e:WebViewEvent):void
{
trace("The document failed to load");
}
}
}
QNXStageWebView class is attached to the stage to render a String containing
HTML markup.
package
{
import flash.display.Sprite;
import flash.geom.Rectangle;
import qnx.media.QNXStageWebView;
[SWF(height="600", width="1024", frameRate="30", backgroundColor="#FFFFFF")]
public class myStageWebLocal extends Sprite
{
private var MySwv:QNXStageWebView;
public function myStageWebLocal()
{
initializeUI();
}
public function initializeUI():void
{
var htmlString:String;
htmlString = "<!DOCTYPE HTML>" +
"<html>" +
"<body>" +
"<h1>Hello World</h1>" +
"<p>Hello World</p>" +
"</body>" +
"</html>";
trace(htmlString);
MySwv = new QNXStageWebView("LocalVP");
MySwv.stage = this.stage;
MySwv.viewPort = new Rectangle(50,50,400,500);
MySwv.loadString(htmlString, "text/html");
}
}
}