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 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_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_write_console_messages_to_stdout ()
  get_enable_xss_auditor ()
  get_fantasy_font_family ()
  get_hardware_acceleration_policy ()
  get_javascript_can_access_clipboard ()
  get_javascript_can_open_windows_automatically ()
  get_load_icons_ignoring_image_load_setting ()
  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_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_write_console_messages_to_stdout (enabled)
  set_enable_xss_auditor (enabled)
  set_fantasy_font_family (fantasy_font_family)
  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_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.
draw-compositing-indicators bool r/w/c Whether to draw compositing borders and repaint counters
enable-accelerated-2d-canvas bool r/w/c Whether to enable accelerated 2D canvas
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 r/w/c Whether to enable frame flattening.
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 r/w/c Whether Java support should be enabled.
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 r/w/c Enable embedded plugin objects.
enable-private-browsing bool 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-write-console-messages-to-stdout bool r/w/c Whether to write console messages on stdout
enable-xss-auditor bool r/w/c Whether to enable the XSS auditor.
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 r/w/c Whether to load site icons ignoring image load setting.
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_instance GObject.Object r  

Class Details

class WebKit2.Settings(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:WebKit2.SettingsClass
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, 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, 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 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()
Return type:str
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_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.

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:True If frame flattening is enabled or False otherwise.
Return type:bool

Get the WebKit2.Settings :enable-frame-flattening property.

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:True If Java is enabled or False otherwise.
Return type:bool

Get the WebKit2.Settings :enable-java property.

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.

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_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:True If XSS auditing is enabled or False otherwise.
Return type:bool

Get the WebKit2.Settings :enable-xss-auditor property.

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_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:True If site icon can be loaded irrespective of image loading preference or False otherwise.
Return type:bool

Get the WebKit2.Settings :load-icons-ignoring-image-load-setting property.

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_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.

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

Set the WebKit2.Settings :enable-frame-flattening property.

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.

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.

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_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

Set the WebKit2.Settings :enable-xss-auditor property.

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_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

Set the WebKit2.Settings :load-icons-ignoring-image-load-setting property.

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 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:True
Flags:READABLE, WRITABLE, CONSTRUCT

Whether or not the top frame is allowed to navigate to data URLs. It is encouraged to disable it 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 shown 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.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: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.

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:READABLE, WRITABLE, CONSTRUCT

Whether to enable the frame flattening. With this setting each subframe is expanded to its contents, which will flatten all the frames to become one scrollable page. On touch devices scrollable subframes on a page can result in a confusing user experience.

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:True
Flags:READABLE, WRITABLE, CONSTRUCT

Determines whether or not Java is enabled on the page.

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:True
Flags:READABLE, WRITABLE, CONSTRUCT

Determines whether or not plugins on the page are enabled.

WebKit2.Settings.props.enable_private_browsing
Name:enable-private-browsing
Type:bool
Default Value:False
Flags: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:False
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_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:READABLE, WRITABLE, CONSTRUCT

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

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.ON_DEMAND
Flags:READABLE, WRITABLE, CONSTRUCT

The WebKit2.HardwareAccelerationPolicy to decide how to enable and disable hardware acceleration. The default value WebKit2.HardwareAccelerationPolicy.ON_DEMAND enables the hardware acceleration when the web contents request it. It’s possible to enforce hardware acceleration to be always enabled by using WebKit2.HardwareAccelerationPolicy.ALWAYS. And it’s also possible to disable it completely using WebKit2.HardwareAccelerationPolicy.NEVER. Note that 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:READABLE, WRITABLE, CONSTRUCT

Determines whether a site can load favicons irrespective of the value of WebKit2.Settings :auto-load-images.

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.