Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
WebView.GetPreferences
Queries WebView preferences parameters.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WebView | 2.2 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
WebViewerRef | Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function. | "web" |
ParameterName | The name of the parameter. | isJavaEnabled |
Result
Returns a boolean value for allowsAnimatedImageLooping, allowsAnimatedImages, javaEnabled, javaScriptCanOpenWindowsAutomatically, javaScriptEnabled, loadsImagesAutomatically, plugInsEnabled, privateBrowsingEnabled, shouldPrintBackgrounds, tabsToLinks, userStyleSheetEnabled and usesPageCache; a number for cacheModel, defaultFixedFontSize, defaultFontSize, minimumFontSize or minimumLogicalFontSize; a string for cursiveFontFamily, defaultTextEncodingName, fantasyFontFamily, fixedFontFamily, sansSerifFontFamily, serifFontFamily or standardFontFamily.
Description
Queries WebView preferences parameters.For WebKit 1.x you can pass empty WebViewerRef to access global preferences.
Available keys for WebKit 1.x: allowsAnimatedImageLooping, allowsAnimatedImages, cacheModel, cursiveFontFamily, defaultFixedFontSize, defaultFontSize, defaultTextEncodingName, fantasyFontFamily, fixedFontFamily, javaEnabled, javaScriptCanOpenWindowsAutomatically, javaScriptEnabled, loadsImagesAutomatically, minimumFontSize, minimumLogicalFontSize, plugInsEnabled, privateBrowsingEnabled, sansSerifFontFamily, serifFontFamily, shouldPrintBackgrounds, standardFontFamily, tabsToLinks, userStyleSheetEnabled or usesPageCache.
Available keys for WebKit 2.x (FileMaker 16): developerExtrasEnabled, logsPageMessagesToSystemConsoleEnabled, minimumFontSize, javaScriptEnabled, javaScriptCanOpenWindowsAutomatically, telephoneNumberDetectionIsEnabled, javaEnabled and plugInsEnabled.
New in version 10.2: mediaDevicesEnabled and mediaStreamEnabled to allow camera/microphone/screen access.
New in version 10.3: CrossOriginResourcePolicyEnabled and webSecurityEnabled to enable cross site scripting.
Please check WebKit documentation for details.
Implemented for Windows with Microsoft Edge/Chrome engine in MBS Plugin 11.5 when using FileMaker Pro 19.4 or newer.
Possible keys: IsScriptEnabled, IsWebMessageEnabled, AreDefaultScriptDialogsEnabled, IsStatusBarEnabled, AreDevToolsEnabled, AreDefaultContextMenusEnabled, AreHostObjectsAllowed, IsZoomControlEnabled, IsBuiltInErrorPageEnabled, areBrowserAcceleratorKeysEnabled, IsPinchZoomEnabled, IsPasswordAutosaveEnabled and IsGeneralAutofillEnabled.
MBS Plugin 11.5 adds fraudulentWebsiteWarningEnabled for macOS 10.15 and iOS 13.0 to check whether the warnings or fraudulent websites is enabled. The textInteractionEnabled setting in macOS 12.0 and iOS 15.0 allows to check whether text interactions are enabled.
Added IsSwipeNavigationEnabled and HiddenPdfToolbarItems options in version 14.2 for Windows using WebView 2.
Examples
Queries setting for background printing:
MBS("WebView.GetPreferences"; "shouldPrintBackgrounds")
Query developer extras enabled state for WebViewer:
Set Variable [$r; Value:MBS("Webview.GetPreferences"; "web"; "developerExtrasEnabled")]
Set developer extras enabled state for WebViewer:
Set Variable [$r; Value:MBS("WebView.SetPreferences"; "web"; "developerExtrasEnabled"; 1)]
Check whether pinch zoom is enabled:
MBS( "WebView.GetPreferences"; "web"; "IsPinchZoomEnabled")
See also
Release notes
- Version 14.2
- Added IsSwipeNavigationEnabled and HiddenPdfToolbarItems as options to WebView.SetPreferences and WebView.GetPreferences for Windows.
- Version 13.1
- Added shouldPrintBackgrounds to WebView.SetPreferences and WebView.GetPreferences for WebKit 2 to control printing of backgrounds.
- Version 11.5
- Added fraudulentWebsiteWarningEnabled and textInteractionEnabled settings for WebView.GetPreferences and WebView.SetPreferences functions.
Blog Entries
- MBS FileMaker Plugin, version 14.2pr3
- MBS FileMaker Plugin, version 13.1pr1
- WebPreferences for WebView2
- MBS FileMaker Plugin, version 11.5pr4
- MBS Filemaker Plugin, version 2.2pr3
This function checks for a license.
Created 18th August 2014, last changed 11st April 2024