Closed Informate closed 5 months ago
Feel free to create a PR and edit: https://github.com/tidev/titanium-sdk/blob/master/apidoc/Titanium/UI/iOS/WebViewConfiguration.yml to add the link
I do not know what a PR is, it ask me to fork the entire project. If you can do it for me, I just added a line at the end of the description:
description: |
Use the
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)
a PR is a pull request. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
You fork the project, clone it locally, make the changes, commit the changes and create a PR. The normal github/git way.
But yes, I can do it for you too
PR with your link https://github.com/tidev/titanium-sdk/pull/14072
Thanks!
Thanks! I know you do not like generated code, but it can also extract the entries for iOS:
javaScriptEnabled, javaScriptCanOpenWindowsAutomatically, minimumFontSize, suppressesIncrementalRendering, backspaceKeyNavigationEnabled, tabFocusesLinks, privateBrowsingEnabled, javaScriptMarkupEnabled, hyperlinkAuditingEnabled, offlineWebApplicationCacheEnabled, plugInsEnabled, allowsAnimatedImages, allowsAnimatedImageLooping, loadsImagesAutomatically, autosaves, enablesWebViewDarkMode, mockScrollbarsEnabled, textAreasAreResizable, textTracksEnabled, loadsSiteIconsIgnoringImageLoadingPreference, javaScriptCanAccessClipboard, developerExtrasEnabled, applicationCacheEnabled, javaScriptRuntimeFlags, localStorageEnabled, universalAccessFromFileURLsAllowed, fileAccessFromFileURLsAllowed, fetchAPIKeepAliveEnabled, fetchAPIStreamDataEnabled, contentSecurityPolicyEnabled, contentSecurityPolicyFrameAncestorsEnabled, webGLEnabled, accelerated2DCanvasEnabled, subpixelCSSOMElementMetricsEnabled, mediaDataLoadsAutomatically, backForwardCacheEnabled, suppressesTestingJavaScriptAlerts, linkPrefetchEnabled, networkCacheEnabled, suppressesBackForwardNavigationGestures, canvasUsesAcceleratedDrawing, prefetchDNS, staticDateAndTime, onlineApplicationCacheQuota, privateClickMeasurementEnabled, mediaCaptureRequiresSecureConnection, highPerformanceCanvasRenderingEnabled, screenCaptureRequiresUserGesture, allowsMediaCaptureOnInsecureSites, videoCaptureRequiresSecureConnection, webAudioEnabled, experimentalContentSecurityPolicyEnabled, domTimersThrottlingEnabled, modernMediaControlsEnabled, pictureInPictureEnabled, incrementalRenderingSuppressed, acceleratedCompositingEnabled, scrollAnimatorEnabled, asynchronousPluginInitializationEnabled, asynchronousPluginInitializationEnabledForAllPlugins, asynchronousPluginInitializationEnabledForAppQuirks, pluginProcessesEnabled, plugInSnapshottingEnabled, mediaPlaybackRequiresUserGesture, allowsPictureInPictureMediaPlayback, allowsInlineMediaPlayback, tabFocusesLinksByDefault, mediaDataPreloadingEnabled, allowCrossOriginSubresourcesToAskForCredentials, cacheAPIKeepAliveEnabled, asyncFrameScrollEnabled, zoomsPageToFit, visibleWindowSnapshottedAtBoot, canvasIsAccelerated, mediaControlsScale, mediaPlaybackAllowsInline, audioPlaybackRequiresUserGesture, suppressesIncrementalRendering, downloadsUndecodedImageData, localFileContentSniffingEnabled, pagingEnabled, contentBlockersEnabled, allowsInlineMediaPlaybackInPictureInPicture, shouldRespectImageOrientation, experimentalFeatureEnabled
I have searched and made sure there are no existing issues for the issue I am filing
URL
https://titaniumsdk.com/api/structs/webviewpreferencesobject.html
Description
The list of properties for WebView Preferences is highly incomplete. A full list of the preferences is present at: https://github.com/WebKit/webkit/blob/main/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Suggestion
Complete the list or at least add a link and some explanation to WKPreferences.mm where the list is complete. The functionality already works in titanium if set, as for example does {"webGLEnabled": false}, but are completely undocumented on titanium docs. Some of the interesting preferences includes (as found in other StackOverflow users issues): allowFileAccessFromFileURLs and allowUniversalAccessFromFileURLs that are XMLHttpRequest related features especially useful when working with local WebViews.
Link to list: https://github.com/WebKit/webkit/blob/main/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm