Skip to content

Commit

Permalink
docs: add iOS WebViewConfiguration link (#14072)
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga authored Jun 25, 2024
1 parent 40808cd commit 9f85623
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions apidoc/Titanium/UI/iOS/WebViewConfiguration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ name: Titanium.UI.iOS.WebViewConfiguration
summary: A collection of properties used to initialize a web view.
description: |
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
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](https://github.com/WebKit/webkit/blob/main/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm)
extends: Titanium.Proxy
platforms: [iphone, ipad, macos]
since: {iphone: "8.0.0", ipad: "8.0.0", macos: "9.2.0"}
Expand All @@ -30,7 +32,7 @@ properties:

- name: suppressesIncrementalRendering
summary: |
A Boolean value indicating whether the web view suppresses content rendering until it is fully
A Boolean value indicating whether the web view suppresses content rendering until it is fully
loaded into memory.
type: Boolean
default: false
Expand All @@ -39,8 +41,8 @@ properties:
summary: |
A Boolean value indicating whether HTML5 videos play inline or use the native full-screen controller.
description: |
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
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.
type: Boolean
Expand All @@ -59,7 +61,7 @@ properties:
- name: processPool
summary: The process pool from which to obtain the Web Content process of view.
description: |
When a web view is initialized, either a new web content process is created for it from the
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.
type: Titanium.UI.iOS.WebViewProcessPool
platforms: [iphone, ipad, macos]
Expand All @@ -77,7 +79,7 @@ properties:
- name: javaScriptEnabled
summary: A Boolean value indicating whether JavaScript is enabled.
description: |
Setting this property to false disables JavaScripts that are loaded or executed by the web page.
Setting this property to false disables JavaScripts that are loaded or executed by the web page.
This setting does not affect user scripts.
type: Boolean
default: true
Expand All @@ -93,11 +95,11 @@ examples:
Creates a configuration object and use it as property of webview.
``` js
var config = Ti.UI.iOS.createWebViewConfiguration({
var config = Ti.UI.iOS.createWebViewConfiguration({
allowsPictureInPictureMediaPlayback: true,
preferences: {
preferences: {
minimumFontSize : 20,
},
},
});
var webView = Ti.UI.createWebView({
Expand Down

0 comments on commit 9f85623

Please sign in to comment.