Skip to content
Titanium SDK
Version12.6.2

You are reading 12.6.2. See this page in 13.4.1.

Titanium.UI.iOS.WebViewConfiguration

proxyiPhoneiPadmacOSsince iPhone 8.0.0, iPad 8.0.0, macOS 9.2.0

Extends Titanium.Proxy

A collection of properties used to initialize a web view.

Use the Titanium.UI.iOS.createWebViewConfiguration method to create and use as a parameter of Titanium.UI.WebView.configuration. Using this you can determine how soon a webpage is rendered, how media playback is handled, the granularity of items that the user can select, and many other options. This property can only be set when creating the webview and will be ignored when set afterwards.

See the example section "Usage of WebViewConfiguration with WebView in iOS". Information on additional available preferences can be derived from the original WebKit sources: WKPreferences.mm

Properties 10

A Boolean value indicating whether HTML5 videos play inline or use the native full-screen controller.

You must set this property to play inline video. Set this property to true to play videos inline. Set this property to false to use the native full-screen controller. When adding a video element to a HTML document on the iPhone, you must also include the playsinline attribute. The default value for iPhone is false and the default value for iPad is true.

Default: For iPhone false and for iPad true.

apiName

Stringsince Android 3.2.0, iPhone 3.2.0, iPad 3.2.0, macOS 9.2.0read-only

Inherited from Titanium.Proxy

The name of the API that this proxy corresponds to.

bubbleParent

Booleansince Android 3.0.0, iPhone 3.0.0, iPad 3.0.0, macOS 9.2.0

Inherited from Titanium.Proxy

Indicates if the proxy will bubble an event to its parent.

Default: true

preferences

WebViewPreferencesObject

The preference settings to be used by the web view.

The process pool from which to obtain the Web Content process of view.

When a web view is initialized, either a new web content process is created for it from the specified pool or an existing process in that pool is used.

A Boolean value indicating whether the web view suppresses content rendering until it is fully loaded into memory.

Default: false

Methods 4

Inherited from Titanium.Proxy

Adds the specified callback as an event listener for the named event.

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to invoke when the event is fired.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.

Inherited from Titanium.Proxy

Fires a synthesized event to any registered listeners.

Parameters
ParametersTypeDescription
nameString

Name of the event.

event?Dictionary

A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.

Inherited from Titanium.Proxy

Removes the specified callback as an event listener for the named event.

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to remove. Must be the same function passed to addEventListener.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.