Packagecom.myflashlab.air.extensions.richWebView.ios
Classpublic class WebView
InheritanceWebView Inheritance flash.events.EventDispatcher

An iOS WKWebView class which must be initialized from RichWebView.ios.getInstance.



Public Properties
 PropertyDefined By
  allowsBackForwardNavigationGestures : Boolean
A Boolean value indicating whether horizontal swipe gestures will trigger back-forward list navigations.
WebView
  allowsLinkPreview : Boolean
A Boolean value indicating whether link preview is allowed for any links inside this WKWebView.
WebView
  backForwardList : Array
[read-only]
WebView
  customUserAgent : String
The custom user agent string or null if no custom user agent string has been set.
WebView
  hasOnlySecureContent : Boolean
[read-only] A Boolean value indicating whether all resources on the page have been loaded over securely encrypted connections.
WebView
  height : int
Indicates the height of the webview instance
WebView
  isLoading : Boolean
[read-only] A Boolean value indicating whether the view is currently loading content.
WebView
  scrollView : ScrollView
[read-only] Gives you access to the scrollerView of this webview instance.
WebView
  settings : WebSettings
[read-only] Gives you access to the WebSettings of this webview instance.
WebView
  width : int
Indicates the width of the webview instance
WebView
  x : int
Indicates the x position of the webview instance relative to the main stage
WebView
  y : int
Indicates the y position of the webview instance relative to the main stage
WebView
Public Methods
 MethodDefined By
  
addEventListener($type:String, $listener:Function, $useCapture:Boolean = false, $priority:int = 0, $useWeakReference:Boolean = false):void
[override]
WebView
  
addView($callback:Function):void
Adds the webview instance to the stage (Native windows will always be placed at the top of AIR content).
WebView
  
callJS($msg:String):void
use this method to call Javascript functions.
WebView
  
canGoBack():Boolean
A Boolean value indicating whether there is a back item in the back-forward list that can be navigated to.
WebView
  
canGoForward():Boolean
A Boolean value indicating whether there is a forward item in the back-forward list that can be navigated to.
WebView
  
close():void
closes and removes the webview instance from stage.
WebView
  
getProgress():Number
indicates the page load progress.
WebView
  
getTitle():String
The page title.
WebView
  
getUrl():String
The active URL.
WebView
  
goBack():void
Navigates to the back item in the back-forward list.
WebView
  
goForward():void
Navigates to the forward item in the back-forward list.
WebView
  
hide():void
makes the webview instance invisible if it is already visible.
WebView
  
Loads HTML string as a web content.
WebView
  
loadFile($file:File, $readAccessDir:File):void
Navigates to the requested file on the filesystem.
WebView
  
loadUrl($url:String):void
Loads a webpage from a URL.
WebView
  
reload($fromOrigin:Boolean):void
Reloads the current page.
WebView
  
removeEventListener($type:String, $listener:Function, $useCapture:Boolean = false):void
[override]
WebView
  
setBackgroundColor($color:String):void
sets the background color of the webview instance.
WebView
  
setFocus():void
WebView
  
setViewPort($rect:Rectangle):void
set the x,y,width,height of this webview instance.
WebView
  
show():void
makes the webview instance visible if it is already invisible.
WebView
  
stopLoad():void
Stops loading all resources on the current page.
WebView
  
switchBitmapColorChannel($bmd:BitmapData):BitmapData
[static]
WebView
  
Starts scrolling the webpage from top to bottom to create a full webpage screenshot.
WebView
Property Detail
allowsBackForwardNavigationGesturesproperty
allowsBackForwardNavigationGestures:Boolean

A Boolean value indicating whether horizontal swipe gestures will trigger back-forward list navigations. The default value is NO.


Implementation
    public function get allowsBackForwardNavigationGestures():Boolean
    public function set allowsBackForwardNavigationGestures(value:Boolean):void
allowsLinkPreviewproperty 
allowsLinkPreview:Boolean

A Boolean value indicating whether link preview is allowed for any links inside this WKWebView. The default value is true


Implementation
    public function get allowsLinkPreview():Boolean
    public function set allowsLinkPreview(value:Boolean):void
backForwardListproperty 
backForwardList:Array  [read-only]


Implementation
    public function get backForwardList():Array
customUserAgentproperty 
customUserAgent:String

The custom user agent string or null if no custom user agent string has been set.


Implementation
    public function get customUserAgent():String
    public function set customUserAgent(value:String):void
hasOnlySecureContentproperty 
hasOnlySecureContent:Boolean  [read-only]

A Boolean value indicating whether all resources on the page have been loaded over securely encrypted connections.


Implementation
    public function get hasOnlySecureContent():Boolean
heightproperty 
height:int

Indicates the height of the webview instance


Implementation
    public function get height():int
    public function set height(value:int):void
isLoadingproperty 
isLoading:Boolean  [read-only]

A Boolean value indicating whether the view is currently loading content.


Implementation
    public function get isLoading():Boolean
scrollViewproperty 
scrollView:ScrollView  [read-only]

Gives you access to the scrollerView of this webview instance. Notice that scrollview will be available after it's being added to the stage.


Implementation
    public function get scrollView():ScrollView
settingsproperty 
settings:WebSettings  [read-only]

Gives you access to the WebSettings of this webview instance. Notice that all WebSettings must be set BEFORE the webview instance is added to the stage using the addView method.


Implementation
    public function get settings():WebSettings
widthproperty 
width:int

Indicates the width of the webview instance


Implementation
    public function get width():int
    public function set width(value:int):void
xproperty 
x:int

Indicates the x position of the webview instance relative to the main stage


Implementation
    public function get x():int
    public function set x(value:int):void
yproperty 
y:int

Indicates the y position of the webview instance relative to the main stage


Implementation
    public function get y():int
    public function set y(value:int):void
Method Detail
addEventListener()method
override public function addEventListener($type:String, $listener:Function, $useCapture:Boolean = false, $priority:int = 0, $useWeakReference:Boolean = false):void

Parameters

$type:String
 
$listener:Function
 
$useCapture:Boolean (default = false)
 
$priority:int (default = 0)
 
$useWeakReference:Boolean (default = false)

addView()method 
public function addView($callback:Function):void

Adds the webview instance to the stage (Native windows will always be placed at the top of AIR content).

All the webview settings, _webviewInstance.settings. must be set before adding it to the stage. other configurations like scrollbar preferences or background color must be set only after the instance is added to the stage.

Parameters

$callback:Function — callback function to let you know that the native window is now added to the stage.

callJS()method 
public function callJS($msg:String):void

use this method to call Javascript functions. for example if you have a function in your js like this:

	 function diplayAlert(msg)
	 {
	 		alert(msg);
	 }
	 
you can call it this way:
	 _webviewInstance.callJS("diplayAlert('a msg from flash!')");
	 

Parameters

$msg:String

canGoBack()method 
public function canGoBack():Boolean

A Boolean value indicating whether there is a back item in the back-forward list that can be navigated to.

Returns
Boolean
canGoForward()method 
public function canGoForward():Boolean

A Boolean value indicating whether there is a forward item in the back-forward list that can be navigated to.

Returns
Boolean
close()method 
public function close():void

closes and removes the webview instance from stage.

getProgress()method 
public function getProgress():Number

indicates the page load progress.

Returns
Number
getTitle()method 
public function getTitle():String

The page title.

Returns
String
getUrl()method 
public function getUrl():String

The active URL. This is the URL that should be reflected in the user interface.

Returns
String
goBack()method 
public function goBack():void

Navigates to the back item in the back-forward list.

goForward()method 
public function goForward():void

Navigates to the forward item in the back-forward list.

hide()method 
public function hide():void

makes the webview instance invisible if it is already visible.

loadData()method 
public function loadData($data:HtmlDataSettings):void

Loads HTML string as a web content. You must construct your HTML string in a HtmlDataSettings object.

Parameters

$data:HtmlDataSettings

loadFile()method 
public function loadFile($file:File, $readAccessDir:File):void

Navigates to the requested file on the filesystem.

Parameters

$file:File — The file object to which to navigate.
 
$readAccessDir:File — The directory object to allow read access to.

loadUrl()method 
public function loadUrl($url:String):void

Loads a webpage from a URL. Notice that you should pass URLs starting with 'https://'

Parameters

$url:String

reload()method 
public function reload($fromOrigin:Boolean):void

Reloads the current page. If $fromOrigin is set to true, performing end-to-end revalidation using cache-validating conditionals if possible.

Parameters

$fromOrigin:Boolean

removeEventListener()method 
override public function removeEventListener($type:String, $listener:Function, $useCapture:Boolean = false):void

Parameters

$type:String
 
$listener:Function
 
$useCapture:Boolean (default = false)

setBackgroundColor()method 
public function setBackgroundColor($color:String):void

sets the background color of the webview instance. You must call this method after it's being added to the stage.

Parameters

$color:String — can be in #AARRGGBB or #RRGGBB format

setFocus()method 
public function setFocus():void

setViewPort()method 
public function setViewPort($rect:Rectangle):void

set the x,y,width,height of this webview instance.

Parameters

$rect:Rectangle

show()method 
public function show():void

makes the webview instance visible if it is already invisible.

stopLoad()method 
public function stopLoad():void

Stops loading all resources on the current page.

switchBitmapColorChannel()method 
public static function switchBitmapColorChannel($bmd:BitmapData):BitmapData

Parameters

$bmd:BitmapData

Returns
BitmapData
takeScreenshot()method 
public function takeScreenshot():void

Starts scrolling the webpage from top to bottom to create a full webpage screenshot. When it's work is completed, the event WebViewEvents.SCREENSHOT will be dispatched.