From 9f85623fa45dda478124a9b52794c77eb60bd5ac Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Tue, 25 Jun 2024 04:58:37 +0200 Subject: [PATCH] docs: add iOS WebViewConfiguration link (#14072) --- .../Titanium/UI/iOS/WebViewConfiguration.yml | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apidoc/Titanium/UI/iOS/WebViewConfiguration.yml b/apidoc/Titanium/UI/iOS/WebViewConfiguration.yml index e7c2d29788f..7bf7efc2eb2 100644 --- a/apidoc/Titanium/UI/iOS/WebViewConfiguration.yml +++ b/apidoc/Titanium/UI/iOS/WebViewConfiguration.yml @@ -3,10 +3,12 @@ name: Titanium.UI.iOS.WebViewConfiguration summary: A collection of properties used to initialize a web view. description: | Use the method to create and use as a parameter of . - 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"} @@ -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 @@ -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 @@ -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] @@ -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 @@ -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({