Package | com.distriqt.extension.nativewebview |
Class | public final class NativeWebView |
Inheritance | NativeWebView ![]() |
Property | Defined By | ||
---|---|---|---|
browserView : BrowserView [read-only]
Access to the web browser view
| NativeWebView | ||
cookieManager : CookieManager [read-only]
Access to get Cookie Manager for managing web view cookies
| NativeWebView | ||
implementation : String [read-only]
The implementation currently in use. | NativeWebView | ||
isSupported : Boolean [static] [read-only]
Whether the current device supports the extensions functionality
| NativeWebView | ||
nativeVersion : String [read-only]
The native version string of the native extension. | NativeWebView | ||
service : NativeWebView [static] [read-only]
The singleton instance of the NativeWebView class. | NativeWebView | ||
version : String [read-only]
The version of this extension. | NativeWebView |
Method | Defined By | ||
---|---|---|---|
Constructor
You should not call this directly, but instead use the singleton access
| NativeWebView | ||
attemptResolveAvailability():Boolean
Attempts to resolve the availability issue by redirecting the user to the appropriate setting
| NativeWebView | ||
Create a WebView and initialises the viewport and options of the view. | NativeWebView | ||
dispose():void
Disposes the extension and releases any allocated resources. | NativeWebView | ||
init(key:String):void Deprecated: You no longer need to use an application key [static]
Initialises the extension class for use with the provided key. | NativeWebView | ||
initCache(memoryCapacity:int = 16777216, diskCapacity:int = 33554432):void Deprecated: Use initialisePlatform options instead
Initialise the size of the web cache. | NativeWebView | ||
initialisePlatform(options:NativeWebViewOptions, callback:Function = null):void
Initialises the platform options that apply to all webviews created. | NativeWebView | ||
isAvailable():Boolean
Checks if the webview functionality is currently available. | NativeWebView |
Constant | Defined By | ||
---|---|---|---|
EXT_CONTEXT_ID : String = com.distriqt.NativeWebView [static] | NativeWebView | ||
VERSION : String = 8.0.0 [static] | NativeWebView |
browserView | property |
browserView:BrowserView
[read-only]
Access to the web browser view
public function get browserView():BrowserView
cookieManager | property |
cookieManager:CookieManager
[read-only]
Access to get Cookie Manager for managing web view cookies
public function get cookieManager():CookieManager
implementation | property |
implementation:String
[read-only]
The implementation currently in use. This should be one of the following depending on the platform in use and the functionality supported by this extension:
Android
iOS
default
unknown
public function get implementation():String
isSupported | property |
isSupported:Boolean
[read-only] Whether the current device supports the extensions functionality
public static function get isSupported():Boolean
nativeVersion | property |
nativeVersion:String
[read-only]
The native version string of the native extension.
public function get nativeVersion():String
service | property |
service:NativeWebView
[read-only] The singleton instance of the NativeWebView class.
public static function get service():NativeWebView
Error — If there was a problem creating or accessing the extension, or if the key is invalid
|
version | property |
version:String
[read-only]
The version of this extension.
This should be of the format, MAJOR.MINOR.BUILD
public function get version():String
NativeWebView | () | Constructor |
public function NativeWebView()
Constructor You should not call this directly, but instead use the singleton access
attemptResolveAvailability | () | method |
public function attemptResolveAvailability():Boolean
Attempts to resolve the availability issue by redirecting the user to the appropriate setting
ReturnsBoolean — true if a resolution process was started and false otherwise
|
createWebView | () | method |
public function createWebView(viewPort:Rectangle, options:WebViewOptions = null, stage:Stage = null):WebView
Create a WebView and initialises the viewport and options of the view.
Parameters
viewPort:Rectangle — The viewport to use as the bounds of the WebView. Must be in screen pixel coordinates.
| |
options:WebViewOptions (default = null ) — Optional: Defines the options to use when creating the WebView, allows specifying things such as zooming, scrolling and background colour
| |
stage:Stage (default = null ) — Optional: If specified allows the extension to help manage focus events between inputs in the webview and in AIR.
|
WebView |
var viewPort:Rectangle = new Rectangle( 0, 0, 100, 100 ); var options:WebViewOptions = new WebViewOptions(); options.mediaPlaybackRequiresUserAction = false; var webView:WebView = NativeWebView.service.createWebView( viewPort, options, this.stage ); webView.addEventListener( NativeWebViewEvent.COMPLETE, webView_completeHandler ); webView.addEventListener( NativeWebViewEvent.ERROR, webView_errorHandler );
dispose | () | method |
public function dispose():void
Disposes the extension and releases any allocated resources. Once this function
has been called, a call to init
is neccesary again before any of the
extensions functionality will work.
init | () | method |
public static function init(key:String):void
Initialises the extension class for use with the provided key.
Parameters
key:String |
initCache | () | method |
public function initCache(memoryCapacity:int = 16777216, diskCapacity:int = 33554432):void
Initialise the size of the web cache. The best usage of this function is to call it once in your application before creating any WebView instances.
iOS Only
Parameters
memoryCapacity:int (default = 16777216 ) — The size of memory cache in bytes
| |
diskCapacity:int (default = 33554432 ) — The size of the disk cache in bytes
|
initialisePlatform | () | method |
public function initialisePlatform(options:NativeWebViewOptions, callback:Function = null):void
Initialises the platform options that apply to all webviews created. You cannot change these settings, unless you dispose the extension (along with all WebViews). Most of these options are platform specific, meaning that they apply settings that are only applicable to specific platforms. If you do not call this function then it will be called automatically with the defaults when the first webview is created.
Parameters
options:NativeWebViewOptions | |
callback:Function (default = null )
|
isAvailable | () | method |
public function isAvailable():Boolean
Checks if the webview functionality is currently available. This may return false if the user has disabled the web view functionality.
ReturnsBoolean — true if the webview functionality is currently available and false if the user has disabled it
|
EXT_CONTEXT_ID | Constant |
public static const EXT_CONTEXT_ID:String = com.distriqt.NativeWebView
VERSION | Constant |
public static const VERSION:String = 8.0.0