Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add iOS WebViewConfiguration link #14072

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading