WebKit2.Settings

g GObject.Object GObject.Object WebKit2.Settings WebKit2.Settings GObject.Object->WebKit2.Settings

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

font_size_to_pixels (points)

class

font_size_to_points (pixels)

class

get_all_features ()

class

get_development_features ()

class

get_experimental_features ()

class

new ()

get_allow_file_access_from_file_urls ()

get_allow_modal_dialogs ()

get_allow_top_navigation_to_data_urls ()

get_allow_universal_access_from_file_urls ()

get_auto_load_images ()

get_cursive_font_family ()

get_default_charset ()

get_default_font_family ()

get_default_font_size ()

get_default_monospace_font_size ()

get_disable_web_security ()

get_draw_compositing_indicators ()

get_enable_accelerated_2d_canvas ()

get_enable_back_forward_navigation_gestures ()

get_enable_caret_browsing ()

get_enable_developer_extras ()

get_enable_dns_prefetching ()

get_enable_encrypted_media ()

get_enable_frame_flattening ()

get_enable_fullscreen ()

get_enable_html5_database ()

get_enable_html5_local_storage ()

get_enable_hyperlink_auditing ()

get_enable_java ()

get_enable_javascript ()

get_enable_javascript_markup ()

get_enable_media ()

get_enable_media_capabilities ()

get_enable_media_stream ()

get_enable_mediasource ()

get_enable_mock_capture_devices ()

get_enable_offline_web_application_cache ()

get_enable_page_cache ()

get_enable_plugins ()

get_enable_private_browsing ()

get_enable_resizable_text_areas ()

get_enable_site_specific_quirks ()

get_enable_smooth_scrolling ()

get_enable_spatial_navigation ()

get_enable_tabs_to_links ()

get_enable_webaudio ()

get_enable_webgl ()

get_enable_webrtc ()

get_enable_write_console_messages_to_stdout ()

get_enable_xss_auditor ()

get_fantasy_font_family ()

get_feature_enabled (feature)

get_hardware_acceleration_policy ()

get_javascript_can_access_clipboard ()

get_javascript_can_open_windows_automatically ()

get_load_icons_ignoring_image_load_setting ()

get_media_content_types_requiring_hardware_support ()

get_media_playback_allows_inline ()

get_media_playback_requires_user_gesture ()

get_minimum_font_size ()

get_monospace_font_family ()

get_pictograph_font_family ()

get_print_backgrounds ()

get_sans_serif_font_family ()

get_serif_font_family ()

get_user_agent ()

get_zoom_text_only ()

set_allow_file_access_from_file_urls (allowed)

set_allow_modal_dialogs (allowed)

set_allow_top_navigation_to_data_urls (allowed)

set_allow_universal_access_from_file_urls (allowed)

set_auto_load_images (enabled)

set_cursive_font_family (cursive_font_family)

set_default_charset (default_charset)

set_default_font_family (default_font_family)

set_default_font_size (font_size)

set_default_monospace_font_size (font_size)

set_disable_web_security (disabled)

set_draw_compositing_indicators (enabled)

set_enable_accelerated_2d_canvas (enabled)

set_enable_back_forward_navigation_gestures (enabled)

set_enable_caret_browsing (enabled)

set_enable_developer_extras (enabled)

set_enable_dns_prefetching (enabled)

set_enable_encrypted_media (enabled)

set_enable_frame_flattening (enabled)

set_enable_fullscreen (enabled)

set_enable_html5_database (enabled)

set_enable_html5_local_storage (enabled)

set_enable_hyperlink_auditing (enabled)

set_enable_java (enabled)

set_enable_javascript (enabled)

set_enable_javascript_markup (enabled)

set_enable_media (enabled)

set_enable_media_capabilities (enabled)

set_enable_media_stream (enabled)

set_enable_mediasource (enabled)

set_enable_mock_capture_devices (enabled)

set_enable_offline_web_application_cache (enabled)

set_enable_page_cache (enabled)

set_enable_plugins (enabled)

set_enable_private_browsing (enabled)

set_enable_resizable_text_areas (enabled)

set_enable_site_specific_quirks (enabled)

set_enable_smooth_scrolling (enabled)

set_enable_spatial_navigation (enabled)

set_enable_tabs_to_links (enabled)

set_enable_webaudio (enabled)

set_enable_webgl (enabled)

set_enable_webrtc (enabled)

set_enable_write_console_messages_to_stdout (enabled)

set_enable_xss_auditor (enabled)

set_fantasy_font_family (fantasy_font_family)

set_feature_enabled (feature, enabled)

set_hardware_acceleration_policy (policy)

set_javascript_can_access_clipboard (enabled)

set_javascript_can_open_windows_automatically (enabled)

set_load_icons_ignoring_image_load_setting (enabled)

set_media_content_types_requiring_hardware_support (content_types)

set_media_playback_allows_inline (enabled)

set_media_playback_requires_user_gesture (enabled)

set_minimum_font_size (font_size)

set_monospace_font_family (monospace_font_family)

set_pictograph_font_family (pictograph_font_family)

set_print_backgrounds (print_backgrounds)

set_sans_serif_font_family (sans_serif_font_family)

set_serif_font_family (serif_font_family)

set_user_agent (user_agent)

set_user_agent_with_application_details (application_name, application_version)

set_zoom_text_only (zoom_text_only)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

allow-file-access-from-file-urls

bool

r/w/c

Whether file access is allowed from file URLs.

allow-modal-dialogs

bool

r/w/c

Whether it is possible to create modal dialogs

allow-top-navigation-to-data-urls

bool

r/w/c

Whether or not top frame navigation is allowed to data URLs

allow-universal-access-from-file-urls

bool

r/w/c

Whether or not universal access is allowed from the context of file scheme URLs

auto-load-images

bool

r/w/c

Load images automatically.

cursive-font-family

str

r/w/c

The font family used as the default for content using cursive font.

default-charset

str

r/w/c

The default text charset used when interpreting content with unspecified charset.

default-font-family

str

r/w/c

The font family to use as the default for content that does not specify a font.

default-font-size

int

r/w/c

The default font size used to display text.

default-monospace-font-size

int

r/w/c

The default font size used to display monospace text.

disable-web-security

bool

r/w/c

Whether web security should be disabled.

draw-compositing-indicators

bool

r/w/c

Whether to draw compositing borders and repaint counters

enable-accelerated-2d-canvas

bool

d/r/w/c

Whether to enable accelerated 2D canvas deprecated

enable-back-forward-navigation-gestures

bool

r/w/c

Whether horizontal swipe gesture will trigger back-forward navigation

enable-caret-browsing

bool

r/w/c

Whether to enable accessibility enhanced keyboard navigation

enable-developer-extras

bool

r/w/c

Whether to enable developer extras

enable-dns-prefetching

bool

r/w/c

Whether to enable DNS prefetching

enable-encrypted-media

bool

r/w/c

Whether EncryptedMedia should be enabled.

enable-frame-flattening

bool

d/r/w/c

Whether to enable frame flattening. deprecated

enable-fullscreen

bool

r/w/c

Whether to enable the Javascript Fullscreen API

enable-html5-database

bool

r/w/c

Whether to enable HTML5 database support.

enable-html5-local-storage

bool

r/w/c

Whether to enable HTML5 Local Storage support.

enable-hyperlink-auditing

bool

r/w/c

Whether <a ping> should be able to send pings.

enable-java

bool

d/r/w/c

Whether Java support should be enabled. deprecated

enable-javascript

bool

r/w/c

Enable JavaScript.

enable-javascript-markup

bool

r/w/c

Enable JavaScript in document markup.

enable-media

bool

r/w/c

Whether media content should be handled

enable-media-capabilities

bool

r/w/c

Whether MediaCapabilities should be enabled.

enable-media-stream

bool

r/w/c

Whether MediaStream content should be handled

enable-mediasource

bool

r/w/c

Whether MediaSource should be enabled.

enable-mock-capture-devices

bool

r/w/c

Whether we expose mock capture devices or not

enable-offline-web-application-cache

bool

r/w/c

Whether to enable offline web application cache.

enable-page-cache

bool

r/w/c

Whether the page cache should be used

enable-plugins

bool

d/r/w/c

Enable embedded plugin objects. deprecated

enable-private-browsing

bool

d/r/w/c

Whether to enable private browsing deprecated

enable-resizable-text-areas

bool

r/w/c

Whether to enable resizable text areas

enable-site-specific-quirks

bool

r/w/c

Enables the site-specific compatibility workarounds

enable-smooth-scrolling

bool

r/w/c

Whether to enable smooth scrolling

enable-spatial-navigation

bool

r/w/c

Whether to enable Spatial Navigation support.

enable-tabs-to-links

bool

r/w/c

Whether to enable tabs to links

enable-webaudio

bool

r/w/c

Whether WebAudio content should be handled

enable-webgl

bool

r/w/c

Whether WebGL content should be rendered

enable-webrtc

bool

r/w/c

Whether WebRTC content should be handled

enable-write-console-messages-to-stdout

bool

r/w/c

Whether to write console messages on stdout

enable-xss-auditor

bool

d/r/w/c

Whether to enable the XSS auditor. deprecated

fantasy-font-family

str

r/w/c

The font family used as the default for content using fantasy font.

hardware-acceleration-policy

WebKit2.HardwareAccelerationPolicy

r/w/c

The policy to decide how to enable and disable hardware acceleration

javascript-can-access-clipboard

bool

r/w/c

Whether JavaScript can access Clipboard

javascript-can-open-windows-automatically

bool

r/w/c

Whether JavaScript can open windows automatically.

load-icons-ignoring-image-load-setting

bool

d/r/w/c

Whether to load site icons ignoring image load setting. deprecated

media-content-types-requiring-hardware-support

str

r/w/c

List of media content types requiring hardware support.

media-playback-allows-inline

bool

r/w/c

Whether media playback allows inline

media-playback-requires-user-gesture

bool

r/w/c

Whether media playback requires user gesture

minimum-font-size

int

r/w/c

The minimum font size used to display text.

monospace-font-family

str

r/w/c

The font family used as the default for content using monospace font.

pictograph-font-family

str

r/w/c

The font family used as the default for content using pictograph font.

print-backgrounds

bool

r/w/c

Whether background images should be drawn during printing

sans-serif-font-family

str

r/w/c

The font family used as the default for content using sans-serif font.

serif-font-family

str

r/w/c

The font family used as the default for content using serif font.

user-agent

str

r/w/c

The user agent string

zoom-text-only

bool

r/w/c

Whether zoom level of web view changes only the text size

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class WebKit2.Settings(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

WebKit2.SettingsClass

Control the behaviour of a WebKit2.WebView.

WebKit2.Settings can be applied to a WebKit2.WebView to control text charset, color, font sizes, printing mode, script support, loading of images and various other things on a WebKit2.WebView. After creation, a WebKit2.Settings object contains default settings.

``c // Disable JavaScript WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group); webkit_settings_set_enable_javascript (settings, FALSE); ``

classmethod font_size_to_pixels(points)
Parameters:

points (int) – the font size in points to convert to pixels

Returns:

the equivalent font size in pixels.

Return type:

int

Convert points to the equivalent value in pixels.

Convert points to the equivalent value in pixels, based on the current screen DPI. Applications can use this function to convert font size values in points to font size values in pixels when setting the font size properties of WebKit2.Settings.

New in version 2.20.

classmethod font_size_to_points(pixels)
Parameters:

pixels (int) – the font size in pixels to convert to points

Returns:

the equivalent font size in points.

Return type:

int

Convert pixels to the equivalent value in points.

Convert pixels to the equivalent value in points, based on the current screen DPI. Applications can use this function to convert font size values in pixels to font size values in points when getting the font size properties of WebKit2.Settings.

New in version 2.20.

classmethod get_all_features()
Returns:

List of all features.

Return type:

WebKit2.FeatureList

Gets the list of all available WebKit features.

Features can be toggled with [method`Settings`.set_feature_enabled], and their current state determined with [method`Settings`.get_feature_enabled].

Note that most applications should use [func`Settings`.get_development_features] and [func`Settings`.get_experimental_features] instead.

New in version 2.42.

classmethod get_development_features()
Returns:

List of development features.

Return type:

WebKit2.FeatureList

Gets the list of available development WebKit features.

The returned features are a subset of those returned by [func`Settings`.get_all_features], and includes those which web and WebKit developers might find useful, but in general should *not* be exposed to end users; see [enum`FeatureStatus`] for more details.

New in version 2.42.

classmethod get_experimental_features()
Returns:

List of experimental features.

Return type:

WebKit2.FeatureList

Gets the list of available experimental WebKit features.

The returned features are a subset of those returned by [func`Settings`.get_all_features], and includes those which certain applications may want to expose to end users; see [enum`FeatureStatus`] for more details.

New in version 2.42.

classmethod new()
Returns:

a new WebKit2.Settings instance.

Return type:

WebKit2.Settings

Creates a new WebKit2.Settings instance with default values.

It must be manually attached to a WebKit2.WebView. See also webkit_settings_new_with_settings().

get_allow_file_access_from_file_urls()
Returns:

True If file access from file URLs is allowed or False otherwise.

Return type:

bool

Get the WebKit2.Settings :allow-file-access-from-file-urls property.

New in version 2.10.

get_allow_modal_dialogs()
Returns:

True if it’s allowed to create and run modal dialogs or False otherwise.

Return type:

bool

Get the WebKit2.Settings :allow-modal-dialogs property.

get_allow_top_navigation_to_data_urls()
Returns:

True If navigation to data URLs from the top frame is allowed or False\ otherwise.

Return type:

bool

Get the WebKit2.Settings :allow-top-navigation-to-data-urls property.

New in version 2.28.

get_allow_universal_access_from_file_urls()
Returns:

True If universal access from file URLs is allowed or False otherwise.

Return type:

bool

Get the WebKit2.Settings :allow-universal-access-from-file-urls property.

New in version 2.14.

get_auto_load_images()
Returns:

True If auto loading of images is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :auto-load-images property.

get_cursive_font_family()
Returns:

The default font family used to display content marked with cursive font.

Return type:

str

Gets the WebKit2.Settings :cursive-font-family property.

get_default_charset()
Returns:

Default charset.

Return type:

str

Gets the WebKit2.Settings :default-charset property.

get_default_font_family()
Returns:

The default font family used to display content that does not specify a font.

Return type:

str

Gets the WebKit2.Settings :default-font-family property.

get_default_font_size()
Returns:

The default font size, in pixels.

Return type:

int

Gets the WebKit2.Settings :default-font-size property.

get_default_monospace_font_size()
Returns:

Default monospace font size, in pixels.

Return type:

int

Gets the WebKit2.Settings :default-monospace-font-size property.

get_disable_web_security()
Returns:

True If web security support is disabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :disable-web-security property.

New in version 2.40.

get_draw_compositing_indicators()
Returns:

True If compositing borders are drawn or False otherwise.

Return type:

bool

Get the WebKit2.Settings :draw-compositing-indicators property.

get_enable_accelerated_2d_canvas()
Returns:

True if accelerated 2D canvas is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-accelerated-2d-canvas property.

New in version 2.2.

Deprecated since version 2.32..

get_enable_back_forward_navigation_gestures()
Returns:

True if horizontal swipe gesture will trigger back-forward navigaiton or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-back-forward-navigation-gestures property.

New in version 2.24.

get_enable_caret_browsing()
Returns:

True If caret browsing is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-caret-browsing property.

get_enable_developer_extras()
Returns:

True If developer extras is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-developer-extras property.

get_enable_dns_prefetching()
Returns:

True If DNS prefetching is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-dns-prefetching property.

get_enable_encrypted_media()
Returns:

True if EncryptedMedia support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-encrypted-media property.

New in version 2.20.

get_enable_frame_flattening()
Returns:

False

Return type:

bool

Frame flattening is no longer supported. This function returns False.

Deprecated since version 2.38.

get_enable_fullscreen()
Returns:

True If fullscreen support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-fullscreen property.

get_enable_html5_database()
Returns:

True if IndexedDB support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-html5-database property.

get_enable_html5_local_storage()
Returns:

True If HTML5 local storage support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-html5-local-storage property.

Returns:

True If hyper link auditing is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-hyperlink-auditing property.

get_enable_java()
Returns:

False always.

Return type:

bool

Get the WebKit2.Settings :enable-java property.

Deprecated since version 2.38.: This function always returns False.

get_enable_javascript()
Returns:

True If JavaScript is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-javascript property.

get_enable_javascript_markup()
Returns:

True if JavaScript markup is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-javascript-markup property.

New in version 2.24.

get_enable_media()
Returns:

True if media support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-media property.

New in version 2.26.

get_enable_media_capabilities()
Returns:

True if MediaCapabilities support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-media-capabilities property.

New in version 2.22.

get_enable_media_stream()
Returns:

True If mediastream support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-media-stream property.

New in version 2.4.

get_enable_mediasource()
Returns:

True If MediaSource support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-mediasource property.

New in version 2.4.

get_enable_mock_capture_devices()
Returns:

True If mock capture devices is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-mock-capture-devices property.

New in version 2.24.

get_enable_offline_web_application_cache()
Returns:

True If HTML5 offline web application cache support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-offline-web-application-cache property.

get_enable_page_cache()
Returns:

True if page cache enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-page-cache property.

get_enable_plugins()
Returns:

True If plugins are enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-plugins property.

Deprecated since version 2.32.

get_enable_private_browsing()
Returns:

True If private browsing is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-private-browsing property.

Deprecated since version 2.16.: Use WebKit2.WebView :is-ephemeral or WebKit2.WebContext :is-ephemeral instead.

get_enable_resizable_text_areas()
Returns:

True If text areas can be resized or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-resizable-text-areas property.

get_enable_site_specific_quirks()
Returns:

True if site specific quirks are enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-site-specific-quirks property.

get_enable_smooth_scrolling()
Returns:

True if smooth scrolling is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-smooth-scrolling property.

get_enable_spatial_navigation()
Returns:

True If HTML5 spatial navigation support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-spatial-navigation property.

New in version 2.2.

Returns:

True If tabs to link is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-tabs-to-links property.

get_enable_webaudio()
Returns:

True If webaudio support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-webaudio property.

get_enable_webgl()
Returns:

True If WebGL support is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-webgl property.

get_enable_webrtc()
Returns:

True If WebRTC support is enabled or False otherwise.

Return type:

bool

Get the [property`Settings`:py:data::enable-webrtc<WebKit2.Settings.props.enable_webrtc>] property.

New in version 2.38.

get_enable_write_console_messages_to_stdout()
Returns:

True if writing console messages to stdout is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :enable-write-console-messages-to-stdout property.

New in version 2.2.

get_enable_xss_auditor()
Returns:

False

Return type:

bool

The XSS auditor has been removed. This function returns False.

Deprecated since version 2.38.: This function does nothing.

get_fantasy_font_family()
Returns:

The default font family used to display content marked with fantasy font.

Return type:

str

Gets the WebKit2.Settings :fantasy-font-family property.

get_feature_enabled(feature)
Parameters:

feature (WebKit2.Feature) – the feature to toggle.

Returns:

Whether the feature is enabled.

Return type:

bool

Gets whether a feature is enabled.

New in version 2.42.

get_hardware_acceleration_policy()
Returns:

a WebKit2.HardwareAccelerationPolicy

Return type:

WebKit2.HardwareAccelerationPolicy

Get the WebKit2.Settings :hardware-acceleration-policy property.

New in version 2.16.

get_javascript_can_access_clipboard()
Returns:

True If javascript-can-access-clipboard is enabled or False otherwise.

Return type:

bool

Get the WebKit2.Settings :javascript-can-access-clipboard property.

get_javascript_can_open_windows_automatically()
Returns:

True If JavaScript can open window automatically or False otherwise.

Return type:

bool

Get the WebKit2.Settings :javascript-can-open-windows-automatically property.

get_load_icons_ignoring_image_load_setting()
Returns:

False

Return type:

bool

Setting no longer supported. This function returns False.

Deprecated since version 2.42.

get_media_content_types_requiring_hardware_support()
Returns:

Media content types requiring hardware support, or None.

Return type:

str

Gets the WebKit2.Settings :media-content-types-requiring-hardware-support property.

New in version 2.30.

get_media_playback_allows_inline()
Returns:

True If inline playback is allowed for media or False if only fullscreen playback is allowed.

Return type:

bool

Get the WebKit2.Settings :media-playback-allows-inline property.

get_media_playback_requires_user_gesture()
Returns:

True If an user gesture is needed to play or load media or False if no user gesture is needed.

Return type:

bool

Get the WebKit2.Settings :media-playback-requires-user-gesture property.

get_minimum_font_size()
Returns:

Minimum font size, in pixels.

Return type:

int

Gets the WebKit2.Settings :minimum-font-size property.

get_monospace_font_family()
Returns:

Default font family used to display content marked with monospace font.

Return type:

str

Gets the WebKit2.Settings :monospace-font-family property.

get_pictograph_font_family()
Returns:

The default font family used to display content marked with pictograph font.

Return type:

str

Gets the WebKit2.Settings :pictograph-font-family property.

get_print_backgrounds()
Returns:

True If background images should be printed or False otherwise.

Return type:

bool

Get the WebKit2.Settings :print-backgrounds property.

get_sans_serif_font_family()
Returns:

The default font family used to display content marked with sans-serif font.

Return type:

str

Gets the WebKit2.Settings :sans-serif-font-family property.

get_serif_font_family()
Returns:

The default font family used to display content marked with serif font.

Return type:

str

Gets the WebKit2.Settings :serif-font-family property.

get_user_agent()
Returns:

The current value of the user-agent property.

Return type:

str

Get the WebKit2.Settings :user-agent property.

get_zoom_text_only()
Returns:

True If zoom level of the view should only affect the text or False if all view contents should be scaled.

Return type:

bool

Get the WebKit2.Settings :zoom-text-only property.

set_allow_file_access_from_file_urls(allowed)
Parameters:

allowed (bool) – Value to be set

Set the WebKit2.Settings :allow-file-access-from-file-urls property.

New in version 2.10.

set_allow_modal_dialogs(allowed)
Parameters:

allowed (bool) – Value to be set

Set the WebKit2.Settings :allow-modal-dialogs property.

set_allow_top_navigation_to_data_urls(allowed)
Parameters:

allowed (bool) – Value to be set

Set the WebKit2.Settings :allow-top-navigation-to-data-urls property.

New in version 2.28.

set_allow_universal_access_from_file_urls(allowed)
Parameters:

allowed (bool) – Value to be set

Set the WebKit2.Settings :allow-universal-access-from-file-urls property.

New in version 2.14.

set_auto_load_images(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :auto-load-images property.

set_cursive_font_family(cursive_font_family)
Parameters:

cursive_font_family (str) – the new default cursive font family

Set the WebKit2.Settings :cursive-font-family property.

set_default_charset(default_charset)
Parameters:

default_charset (str) – default charset to be set

Set the WebKit2.Settings :default-charset property.

set_default_font_family(default_font_family)
Parameters:

default_font_family (str) – the new default font family

Set the WebKit2.Settings :default-font-family property.

set_default_font_size(font_size)
Parameters:

font_size (int) – default font size to be set in pixels

Set the WebKit2.Settings :default-font-size property.

set_default_monospace_font_size(font_size)
Parameters:

font_size (int) – default monospace font size to be set in pixels

Set the WebKit2.Settings :default-monospace-font-size property.

set_disable_web_security(disabled)
Parameters:

disabled (bool) – Value to be set

Set the WebKit2.Settings :disable-web-security property.

New in version 2.40.

set_draw_compositing_indicators(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :draw-compositing-indicators property.

set_enable_accelerated_2d_canvas(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-accelerated-2d-canvas property.

New in version 2.2.

Deprecated since version 2.32..

set_enable_back_forward_navigation_gestures(enabled)
Parameters:

enabled (bool) – value to be set

Set the WebKit2.Settings :enable-back-forward-navigation-gestures property.

New in version 2.24.

set_enable_caret_browsing(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-caret-browsing property.

set_enable_developer_extras(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-developer-extras property.

set_enable_dns_prefetching(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-dns-prefetching property.

set_enable_encrypted_media(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-encrypted-media property.

New in version 2.20.

set_enable_frame_flattening(enabled)
Parameters:

enabled (bool) – Value to be set

Frame flattening is no longer supported. This function does nothing.

Deprecated since version 2.38.

set_enable_fullscreen(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-fullscreen property.

set_enable_html5_database(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-html5-database property.

set_enable_html5_local_storage(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-html5-local-storage property.

Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-hyperlink-auditing property.

set_enable_java(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-java property.

Deprecated function that does nothing.

Deprecated since version 2.38.: This function does nothing.

set_enable_javascript(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-javascript property.

set_enable_javascript_markup(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-javascript-markup property.

New in version 2.24.

set_enable_media(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-media property.

New in version 2.26.

set_enable_media_capabilities(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-media-capabilities property.

New in version 2.22.

set_enable_media_stream(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-media-stream property.

New in version 2.4.

set_enable_mediasource(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-mediasource property.

New in version 2.4.

set_enable_mock_capture_devices(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-mock-capture-devices property.

New in version 2.4.

set_enable_offline_web_application_cache(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-offline-web-application-cache property.

set_enable_page_cache(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-page-cache property.

set_enable_plugins(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-plugins property.

Deprecated since version 2.32.

set_enable_private_browsing(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-private-browsing property.

Deprecated since version 2.16.: Use WebKit2.WebView :is-ephemeral or WebKit2.WebContext :is-ephemeral instead.

set_enable_resizable_text_areas(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-resizable-text-areas property.

set_enable_site_specific_quirks(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-site-specific-quirks property.

set_enable_smooth_scrolling(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-smooth-scrolling property.

set_enable_spatial_navigation(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-spatial-navigation property.

New in version 2.2.

Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-tabs-to-links property.

set_enable_webaudio(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-webaudio property.

set_enable_webgl(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-webgl property.

set_enable_webrtc(enabled)
Parameters:

enabled (bool) – Value to be set

Set the [property`Settings`:py:data::enable-webrtc<WebKit2.Settings.props.enable_webrtc>] property.

Setting this property to True implies the media-stream web-setting will also be enabled.

New in version 2.38.

set_enable_write_console_messages_to_stdout(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :enable-write-console-messages-to-stdout property.

New in version 2.2.

set_enable_xss_auditor(enabled)
Parameters:

enabled (bool) – Value to be set

The XSS auditor has been removed. This function does nothing.

Deprecated since version 2.38.: This function does nothing.

set_fantasy_font_family(fantasy_font_family)
Parameters:

fantasy_font_family (str) – the new default fantasy font family

Set the WebKit2.Settings :fantasy-font-family property.

set_feature_enabled(feature, enabled)
Parameters:
  • feature (WebKit2.Feature) – the feature to toggle.

  • enabled (bool) – whether the feature will be enabled.

Enables or disables a feature.

The current status of the feature can be determined with [id`webkit_settings_get_feature_enabled`]. To reset a feature to its initial status, pass the value returned by [id`webkit_feature_get_default_value`] as the enabled parameter.

New in version 2.42.

set_hardware_acceleration_policy(policy)
Parameters:

policy (WebKit2.HardwareAccelerationPolicy) – a WebKit2.HardwareAccelerationPolicy

Set the WebKit2.Settings :hardware-acceleration-policy property.

New in version 2.16.

set_javascript_can_access_clipboard(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :javascript-can-access-clipboard property.

set_javascript_can_open_windows_automatically(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :javascript-can-open-windows-automatically property.

set_load_icons_ignoring_image_load_setting(enabled)
Parameters:

enabled (bool) – Value to be set

Setting no longer supported. This function does nothing.

Deprecated since version 2.42.

set_media_content_types_requiring_hardware_support(content_types)
Parameters:

content_types (str or None) – list of media content types requiring hardware support split by semicolons (:) or None to use the default value.

Set the WebKit2.Settings :media-content-types-requiring-hardware-support property.

New in version 2.30.

set_media_playback_allows_inline(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :media-playback-allows-inline property.

set_media_playback_requires_user_gesture(enabled)
Parameters:

enabled (bool) – Value to be set

Set the WebKit2.Settings :media-playback-requires-user-gesture property.

set_minimum_font_size(font_size)
Parameters:

font_size (int) – minimum font size to be set in pixels

Set the WebKit2.Settings :minimum-font-size property.

set_monospace_font_family(monospace_font_family)
Parameters:

monospace_font_family (str) – the new default monospace font family

Set the WebKit2.Settings :monospace-font-family property.

set_pictograph_font_family(pictograph_font_family)
Parameters:

pictograph_font_family (str) – the new default pictograph font family

Set the WebKit2.Settings :pictograph-font-family property.

set_print_backgrounds(print_backgrounds)
Parameters:

print_backgrounds (bool) – Value to be set

Set the WebKit2.Settings :print-backgrounds property.

set_sans_serif_font_family(sans_serif_font_family)
Parameters:

sans_serif_font_family (str) – the new default sans-serif font family

Set the WebKit2.Settings :sans-serif-font-family property.

set_serif_font_family(serif_font_family)
Parameters:

serif_font_family (str) – the new default serif font family

Set the WebKit2.Settings :serif-font-family property.

set_user_agent(user_agent)
Parameters:

user_agent (str or None) – The new custom user agent string or None to use the default user agent

Set the WebKit2.Settings :user-agent property.

set_user_agent_with_application_details(application_name, application_version)
Parameters:
  • application_name (str or None) – The application name used for the user agent or None to use the default user agent.

  • application_version (str or None) – The application version for the user agent or None to user the default version.

Set the WebKit2.Settings :user-agent property by appending the application details.

Set the WebKit2.Settings :user-agent property by appending the application details to the default user agent. If no application name or version is given, the default user agent used will be used. If only the version is given, the default engine version is used with the given application name.

set_zoom_text_only(zoom_text_only)
Parameters:

zoom_text_only (bool) – Value to be set

Set the WebKit2.Settings :zoom-text-only property.

Property Details

WebKit2.Settings.props.allow_file_access_from_file_urls
Name:

allow-file-access-from-file-urls

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether file access is allowed from file URLs. By default, when something is loaded in a WebKit2.WebView using a file URI, cross origin requests to other file resources are not allowed. This setting allows you to change that behaviour, so that it would be possible to do a XMLHttpRequest of a local file, for example.

New in version 2.10.

WebKit2.Settings.props.allow_modal_dialogs
Name:

allow-modal-dialogs

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Determine whether it’s allowed to create and run modal dialogs from a WebKit2.WebView through JavaScript with window.showModalDialog. If it’s set to False, the associated WebKit2.WebView won’t be able to create new modal dialogs, so not even the WebKit2.WebView ::create signal will be emitted.

WebKit2.Settings.props.allow_top_navigation_to_data_urls
Name:

allow-top-navigation-to-data-urls

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether or not the top frame is allowed to navigate to data URLs. It is disabled by default due to the risk it poses when loading untrusted URLs, with data URLs being used in scamming and phishing attacks. In contrast, a scenario where it could be enabled could be an app that embeds a WebView and you have control of the pages being show instead of a generic browser.

New in version 2.28.

WebKit2.Settings.props.allow_universal_access_from_file_urls
Name:

allow-universal-access-from-file-urls

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether or not JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. By default, when something is loaded in a WebKit2.WebView using a file scheme URL, access to the local file system and arbitrary local storage is not allowed. This setting allows you to change that behaviour, so that it would be possible to use local storage, for example.

New in version 2.14.

WebKit2.Settings.props.auto_load_images
Name:

auto-load-images

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Determines whether images should be automatically loaded or not. On devices where network bandwidth is of concern, it might be useful to turn this property off.

WebKit2.Settings.props.cursive_font_family
Name:

cursive-font-family

Type:

str

Default Value:

'serif'

Flags:

READABLE, WRITABLE, CONSTRUCT

The font family used as the default for content using a cursive font.

WebKit2.Settings.props.default_charset
Name:

default-charset

Type:

str

Default Value:

'iso-8859-1'

Flags:

READABLE, WRITABLE, CONSTRUCT

The default text charset used when interpreting content with an unspecified charset.

WebKit2.Settings.props.default_font_family
Name:

default-font-family

Type:

str

Default Value:

'sans-serif'

Flags:

READABLE, WRITABLE, CONSTRUCT

The font family to use as the default for content that does not specify a font.

WebKit2.Settings.props.default_font_size
Name:

default-font-size

Type:

int

Default Value:

16

Flags:

READABLE, WRITABLE, CONSTRUCT

The default font size in pixels to use for content displayed if no font size is specified.

WebKit2.Settings.props.default_monospace_font_size
Name:

default-monospace-font-size

Type:

int

Default Value:

13

Flags:

READABLE, WRITABLE, CONSTRUCT

The default font size in pixels to use for content displayed in monospace font if no font size is specified.

WebKit2.Settings.props.disable_web_security
Name:

disable-web-security

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable support for Web Security on pages.

This setting disables the same-origin policy, allowing every website full control over all other websites. This is for use in special environments where you wish to disable all security and allow websites to hack each other. It is impossible to use this setting securely.

New in version 2.40.

WebKit2.Settings.props.draw_compositing_indicators
Name:

draw-compositing-indicators

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to draw compositing borders and repaint counters on layers drawn with accelerated compositing. This is useful for debugging issues related to web content that is composited with the GPU.

WebKit2.Settings.props.enable_accelerated_2d_canvas
Name:

enable-accelerated-2d-canvas

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE, WRITABLE, CONSTRUCT

Enable or disable accelerated 2D canvas. Accelerated 2D canvas is only available if WebKit was compiled with a version of Cairo including the unstable CairoGL API. When accelerated 2D canvas is enabled, WebKit may render some 2D canvas content using hardware accelerated drawing operations.

New in version 2.2.

Deprecated since version 2.32..

WebKit2.Settings.props.enable_back_forward_navigation_gestures
Name:

enable-back-forward-navigation-gestures

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable horizontal swipe gesture for back-forward navigation.

New in version 2.24.

WebKit2.Settings.props.enable_caret_browsing
Name:

enable-caret-browsing

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to enable accessibility enhanced keyboard navigation.

WebKit2.Settings.props.enable_developer_extras
Name:

enable-developer-extras

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Determines whether or not developer tools, such as the Web Inspector, are enabled.

WebKit2.Settings.props.enable_dns_prefetching
Name:

enable-dns-prefetching

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Determines whether or not to prefetch domain names. DNS prefetching attempts to resolve domain names before a user tries to follow a link.

WebKit2.Settings.props.enable_encrypted_media
Name:

enable-encrypted-media

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable support for Encrypted Media API on pages. EncryptedMedia is an experimental JavaScript API for playing encrypted media in HTML. This property will only work as intended if the EncryptedMedia feature is enabled at build time with the ENABLE_ENCRYPTED_MEDIA flag.

See https://www.w3.org/TR/encrypted-media/

New in version 2.20.

WebKit2.Settings.props.enable_frame_flattening
Name:

enable-frame-flattening

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE, WRITABLE, CONSTRUCT

Frame flattening is no longer supported. This property does nothing.

Deprecated since version 2.38.

WebKit2.Settings.props.enable_fullscreen
Name:

enable-fullscreen

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to enable the Javascript Fullscreen API. The API allows any HTML element to request fullscreen display. See also the current draft of the spec: http://www.w3.org/TR/fullscreen/

WebKit2.Settings.props.enable_html5_database
Name:

enable-html5-database

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to enable HTML5 client-side SQL database support (IndexedDB).

WebKit2.Settings.props.enable_html5_local_storage
Name:

enable-html5-local-storage

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to enable HTML5 local storage support. Local storage provides simple synchronous storage access.

HTML5 local storage specification is available at http://dev.w3.org/html5/webstorage/.

Name:

enable-hyperlink-auditing

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Determines whether or not hyperlink auditing is enabled.

The hyperlink auditing specification is available at http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#hyperlink-auditing.

WebKit2.Settings.props.enable_java
Name:

enable-java

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE, WRITABLE, CONSTRUCT

Determines whether or not Java is enabled on the page.

Deprecated since version 2.38.

WebKit2.Settings.props.enable_javascript
Name:

enable-javascript

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Determines whether or not JavaScript executes within a page.

WebKit2.Settings.props.enable_javascript_markup
Name:

enable-javascript-markup

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Determines whether or not JavaScript markup is allowed in document. When this setting is disabled, all JavaScript-related elements and attributes are removed from the document during parsing. Note that executing JavaScript is still allowed if WebKit2.Settings :enable-javascript is True.

New in version 2.24.

WebKit2.Settings.props.enable_media
Name:

enable-media

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable support for media playback on pages. This setting is enabled by default. Disabling it means <audio>, <track> and <video> elements will have playback support disabled.

New in version 2.26.

WebKit2.Settings.props.enable_media_capabilities
Name:

enable-media-capabilities

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable support for MediaCapabilities on pages. This specification intends to provide APIs to allow websites to make an optimal decision when picking media content for the user. The APIs will expose information about the decoding and encoding capabilities for a given format but also output capabilities to find the best match based on the device’s display.

See also https://wicg.github.io/media-capabilities/

New in version 2.22.

WebKit2.Settings.props.enable_media_stream
Name:

enable-media-stream

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable support for MediaStream on pages. MediaStream is an experimental proposal for allowing web pages to access audio and video devices for capture.

See also http://dev.w3.org/2011/webrtc/editor/getusermedia.html

New in version 2.4.

WebKit2.Settings.props.enable_mediasource
Name:

enable-mediasource

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable support for MediaSource on pages. MediaSource extends HTMLMediaElement to allow JavaScript to generate media streams for playback.

See also http://www.w3.org/TR/media-source/

New in version 2.4.

WebKit2.Settings.props.enable_mock_capture_devices
Name:

enable-mock-capture-devices

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable the Mock Capture Devices. Those are fake Microphone and Camera devices to be used as MediaStream sources.

New in version 2.24.

WebKit2.Settings.props.enable_offline_web_application_cache
Name:

enable-offline-web-application-cache

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to enable HTML5 offline web application cache support. Offline web application cache allows web applications to run even when the user is not connected to the network.

HTML5 offline web application specification is available at http://dev.w3.org/html5/spec/offline.html.

WebKit2.Settings.props.enable_page_cache
Name:

enable-page-cache

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable the page cache. Disabling the page cache is generally only useful for special circumstances like low-memory scenarios or special purpose applications like static HTML viewers. This setting only controls the Page Cache, this cache is different than the disk-based or memory-based traditional resource caches, its point is to make going back and forth between pages much faster. For details about the different types of caches and their purposes see: http://webkit.org/blog/427/webkit-page-cache-i-the-basics/

WebKit2.Settings.props.enable_plugins
Name:

enable-plugins

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE, WRITABLE, CONSTRUCT

Determines whether or not plugins on the page are enabled.

Deprecated since version 2.32.

WebKit2.Settings.props.enable_private_browsing
Name:

enable-private-browsing

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE, WRITABLE, CONSTRUCT

Determines whether or not private browsing is enabled. Private browsing will disable history, cache and form auto-fill for any pages visited.

Deprecated since version 2.16.: Use WebKit2.WebView :is-ephemeral or WebKit2.WebsiteDataManager :is-ephemeral instead.

WebKit2.Settings.props.enable_resizable_text_areas
Name:

enable-resizable-text-areas

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Determines whether or not text areas can be resized.

WebKit2.Settings.props.enable_site_specific_quirks
Name:

enable-site-specific-quirks

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to turn on site-specific quirks. Turning this on will tell WebKit to use some site-specific workarounds for better web compatibility. For example, older versions of MediaWiki will incorrectly send to WebKit a CSS file with KHTML workarounds. By turning on site-specific quirks, WebKit will special-case this and other cases to make some specific sites work.

WebKit2.Settings.props.enable_smooth_scrolling
Name:

enable-smooth-scrolling

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable smooth scrolling.

WebKit2.Settings.props.enable_spatial_navigation
Name:

enable-spatial-navigation

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to enable Spatial Navigation. This feature consists in the ability to navigate between focusable elements in a Web page, such as hyperlinks and form controls, by using Left, Right, Up and Down arrow keys. For example, if an user presses the Right key, heuristics determine whether there is an element they might be trying to reach towards the right, and if there are multiple elements, which element they probably wants.

New in version 2.4.

Name:

enable-tabs-to-links

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Determines whether the tab key cycles through the elements on the page. When this setting is enabled, users will be able to focus the next element in the page by pressing the tab key. If the selected element is editable, then pressing tab key will insert the tab character.

WebKit2.Settings.props.enable_webaudio
Name:

enable-webaudio

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable support for WebAudio on pages. WebAudio is an API for processing and synthesizing audio in web applications

See also https://webaudio.github.io/web-audio-api

WebKit2.Settings.props.enable_webgl
Name:

enable-webgl

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable support for WebGL on pages. WebGL enables web content to use an API based on OpenGL ES 2.0.

WebKit2.Settings.props.enable_webrtc
Name:

enable-webrtc

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable WebRTC support for loaded pages.

Enabling this setting implies that [property`Settings`:py:data::enable-media-stream<WebKit2.Settings.props.enable_media_stream>] will be enabled as well.

See also https://www.w3.org/TR/webrtc/

New in version 2.38.

WebKit2.Settings.props.enable_write_console_messages_to_stdout
Name:

enable-write-console-messages-to-stdout

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Enable or disable writing console messages to stdout. These are messages sent to the console with console.log and related methods.

New in version 2.2.

WebKit2.Settings.props.enable_xss_auditor
Name:

enable-xss-auditor

Type:

bool

Default Value:

True

Flags:

DEPRECATED, READABLE, WRITABLE, CONSTRUCT

Whether to enable the XSS auditor. This feature filters some kinds of reflective XSS attacks on vulnerable web sites.

Deprecated since version 2.38.

WebKit2.Settings.props.fantasy_font_family
Name:

fantasy-font-family

Type:

str

Default Value:

'serif'

Flags:

READABLE, WRITABLE, CONSTRUCT

The font family used as the default for content using a fantasy font.

WebKit2.Settings.props.hardware_acceleration_policy
Name:

hardware-acceleration-policy

Type:

WebKit2.HardwareAccelerationPolicy

Default Value:

WebKit2.HardwareAccelerationPolicy.ALWAYS

Flags:

READABLE, WRITABLE, CONSTRUCT

The WebKit2.HardwareAccelerationPolicy to decide how to enable and disable hardware acceleration. Disabling hardware acceleration might cause some websites to not render correctly or consume more CPU.

Note that changing this setting might not be possible if hardware acceleration is not supported by the hardware or the system. In that case, you can get the value to know the actual policy being used, but changing the setting will not have any effect.

New in version 2.16.

WebKit2.Settings.props.javascript_can_access_clipboard
Name:

javascript-can-access-clipboard

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether JavaScript can access the clipboard. The default value is False. If set to True, document.execCommand() allows cut, copy and paste commands.

WebKit2.Settings.props.javascript_can_open_windows_automatically
Name:

javascript-can-open-windows-automatically

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether JavaScript can open popup windows automatically without user intervention.

WebKit2.Settings.props.load_icons_ignoring_image_load_setting
Name:

load-icons-ignoring-image-load-setting

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE, WRITABLE, CONSTRUCT

Unsupported setting. This property does nothing.

Deprecated since version 2.42.

WebKit2.Settings.props.media_content_types_requiring_hardware_support
Name:

media-content-types-requiring-hardware-support

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

List of media content types requiring hardware support, split by semicolons (:). For example: ‘video/webm; codecs=”vp*”:video/mp4; codecs=”avc*”:video/&ast; codecs=”av1*”’.

New in version 2.30.

WebKit2.Settings.props.media_playback_allows_inline
Name:

media-playback-allows-inline

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether media playback is full-screen only or inline playback is allowed. This is True by default, so media playback can be inline. Setting it to False allows specifying that media playback should be always fullscreen.

WebKit2.Settings.props.media_playback_requires_user_gesture
Name:

media-playback-requires-user-gesture

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether a user gesture (such as clicking the play button) would be required to start media playback or load media. This is off by default, so media playback could start automatically. Setting it on requires a gesture by the user to start playback, or to load the media.

WebKit2.Settings.props.minimum_font_size
Name:

minimum-font-size

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT

The minimum font size in pixels used to display text. This setting controls the absolute smallest size. Values other than 0 can potentially break page layouts.

WebKit2.Settings.props.monospace_font_family
Name:

monospace-font-family

Type:

str

Default Value:

'monospace'

Flags:

READABLE, WRITABLE, CONSTRUCT

The font family used as the default for content using a monospace font.

WebKit2.Settings.props.pictograph_font_family
Name:

pictograph-font-family

Type:

str

Default Value:

'serif'

Flags:

READABLE, WRITABLE, CONSTRUCT

The font family used as the default for content using a pictograph font.

WebKit2.Settings.props.print_backgrounds
Name:

print-backgrounds

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether background images should be drawn during printing.

WebKit2.Settings.props.sans_serif_font_family
Name:

sans-serif-font-family

Type:

str

Default Value:

'sans-serif'

Flags:

READABLE, WRITABLE, CONSTRUCT

The font family used as the default for content using a sans-serif font.

WebKit2.Settings.props.serif_font_family
Name:

serif-font-family

Type:

str

Default Value:

'serif'

Flags:

READABLE, WRITABLE, CONSTRUCT

The font family used as the default for content using a serif font.

WebKit2.Settings.props.user_agent
Name:

user-agent

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The user-agent string used by WebKit. Unusual user-agent strings may cause web content to render incorrectly or fail to run, as many web pages are written to parse the user-agent strings of only the most popular browsers. Therefore, it’s typically better to not completely override the standard user-agent, but to use WebKit2.Settings.set_user_agent_with_application_details() instead.

If this property is set to the empty string or None, it will revert to the standard user-agent.

WebKit2.Settings.props.zoom_text_only
Name:

zoom-text-only

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether WebKit2.WebView :zoom-level affects only the text of the page or all the contents. Other contents containing text like form controls will be also affected by zoom factor when this property is enabled.