Platforms to show: All Mac Windows Linux Cross-Platform

Back to WKPreferencesMBS class.

WKPreferencesMBS.crossOriginResourcePolicyEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 21.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether to enable/disable cross origin resource policy.
Example
Dim w As WKPreferencesMBS = HTMLViewer1.WKWebViewMBS.Preferences

w.crossOriginResourcePolicyEnabled = False

Disabling some cross policy checks may allow JavaScript to access a website loaded in a frame.

Default is true.

This property is included in the WebKit project, but not documented by Apple, so use with care and be aware that it may break in future (or gets officially documented in a future version of macOS).
(Read and Write property)

WKPreferencesMBS.defaultFontSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The default font size for fonts.
Example
HTMLViewer1.WKWebView.Preferences.defaultFontSize = 10

(Read and Write property)

Some examples using this property:

WKPreferencesMBS.developerExtrasEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether developer extras are enabled.
Example
HTMLViewer1.WKWebView.Preferences.developerExtrasEnabled = true

Set to true, so you can inspect elements via contextual menus.

This property is included in the WebKit project, but not documented by Apple, so use with care and be aware that it may break in future (or gets officially documented in a future version of macOS).
(Read and Write property)

WKPreferencesMBS.ElementFullscreenEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 23.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value that indicates whether a web view can display content full screen.

The default value for this preference is false.
Requires macOS 12.3 or newer.
(Read and Write property)

WKPreferencesMBS.FraudulentWebsiteWarningEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether warnings should be shown for suspected fraudulent content such as phishing or malware.

The default value is true. This feature is currently available in the following region: China.
(Read and Write property)

WKPreferencesMBS.fullScreenEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 21.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether to allow fullscreen mode.
Example
Dim w As WKPreferencesMBS = HTMLViewer1.WKWebViewMBS.Preferences
w.fullScreenEnabled = true

Default is false.

This property is included in the WebKit project, but not documented by Apple, so use with care and be aware that it may break in future (or gets officially documented in a future version of macOS).
(Read and Write property)

WKPreferencesMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The internal object reference.

(Read only property)

WKPreferencesMBS.javaEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether Java is enabled.
Example
WKWebViewControlMBS1.WKWebView.Preferences.javaEnabled = False

The default value is false.
Deprecated for macOS 10.15.
(Read and Write property)

WKPreferencesMBS.javaScriptCanOpenWindowsAutomatically as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether JavaScript can open windows without user interaction.
Example
WKWebViewControlMBS1.WKWebView.Preferences.javaScriptCanOpenWindowsAutomatically = False

The default value is false in iOS and true in macOS.
(Read and Write property)

WKPreferencesMBS.javaScriptEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether JavaScript is enabled.
Example
WKWebViewControlMBS1.WKWebView.Preferences.javaScriptEnabled = False

The default value is true. Setting this property to false disables JavaScripts that are loaded or executed by the web page. This setting does not affect user scripts. See WKUserScriptMBS class.
(Read and Write property)

WKPreferencesMBS.loadsImagesAutomatically as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether images are loaded automatically.
Example
HTMLViewer1.WKWebView.Preferences.loadsImagesAutomatically = False

(Read and Write property)

WKPreferencesMBS.logsPageMessagesToSystemConsoleEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 21.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether page log messages go to system console.
Example
Dim w As WKPreferencesMBS = HTMLViewer1.WKWebViewMBS.Preferences
w.logsPageMessagesToSystemConsoleEnabled = true

Default is false.

This property is included in the WebKit project, but not documented by Apple, so use with care and be aware that it may break in future (or gets officially documented in a future version of macOS).
(Read and Write property)

WKPreferencesMBS.mediaDevicesEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 21.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether to allow access to media devices in JavaScript.
Example
Dim w As WKPreferencesMBS = HTMLViewer1.WKWebViewMBS.Preferences
w.mediaDevicesEnabled = true
w.mediaStreamEnabled = true

Default is false.

You may need to enable mediaStreamEnabled and mediaDevicesEnabled together to allow WebRTC. Also you need permissions to access camera and microphone via AVFoundation functions.

This property is included in the WebKit project, but not documented by Apple, so use with care and be aware that it may break in future (or gets officially documented in a future version of macOS).
(Read and Write property)

WKPreferencesMBS.mediaStreamEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 21.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether to allow access to media streaming in JavaScript.
Example
Dim w As WKPreferencesMBS = HTMLViewer1.WKWebViewMBS.Preferences
w.mediaDevicesEnabled = true
w.mediaStreamEnabled = true

Default is false.

You may need to enable mediaStreamEnabled and mediaDevicesEnabled together to allow WebRTC. Also you need permissions to access camera and microphone via AVFoundation functions.

This property is included in the WebKit project, but not documented by Apple, so use with care and be aware that it may break in future (or gets officially documented in a future version of macOS).
(Read and Write property)

WKPreferencesMBS.minimumFontSize as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The minimum font size in points.
Example
WKWebViewControlMBS1.WKWebView.Preferences.minimumFontSize = 20

The default value is 0.
(Read and Write property)

WKPreferencesMBS.plugInsEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether plug-ins are enabled.
Example
WKWebViewControlMBS1.WKWebView.Preferences.plugInsEnabled = False

The default value is false.
Deprecated for macOS 10.15.
(Read and Write property)

WKPreferencesMBS.shouldPrintBackgrounds as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether webkit draws background on printing.
Example
HTMLViewer1.WKWebView.Preferences.shouldPrintBackgrounds = False

(Read and Write property)

WKPreferencesMBS.siteSpecificQuirksModeEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 23.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean that indicates whether to apply site-specific compatibility workarounds.

The default value for this preference is true.
Requires macOS 12.3 or newer.
(Read and Write property)

WKPreferencesMBS.standardFontFamily as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The name of the standard font family.

(Read and Write property)

WKPreferencesMBS.tabFocusesLinks as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 20.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
If tabFocusesLinks is true, the tab key will focus links and form controls.

The Option key temporarily reverses this preference.
(Read and Write property)

WKPreferencesMBS.telephoneNumberDetectionIsEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 21.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether phone number detection in text is enabled.
Example
Dim w As WKPreferencesMBS = HTMLViewer1.WKWebViewMBS.Preferences

w.telephoneNumberDetectionIsEnabled = True

Default is false.

This property is included in the WebKit project, but not documented by Apple, so use with care and be aware that it may break in future (or gets officially documented in a future version of macOS).
(Read and Write property)

WKPreferencesMBS.TextInteractionEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 21.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether text interactions are enabled.

Requires macOS 12.0 or iOS 15.0 or newer.
(Read and Write property)

WKPreferencesMBS.webSecurityEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebKit2 MBS Mac64bit Plugin 21.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether to enable/disable web security.
Example
Dim w As WKPreferencesMBS = HTMLViewer1.WKWebViewMBS.Preferences
w.webSecurityEnabled = False

Default is true.

This property is included in the WebKit project, but not documented by Apple, so use with care and be aware that it may break in future (or gets officially documented in a future version of macOS).
(Read and Write property)

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...