Class: Wx::WEB::WebViewConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/web/web_view.rb

Overview

This class allows access to web view configuration options and settings, that have to be specified before placing a webview in a window with Wx::WEB::WebView#create.

Category: WebView

See Also:

Requires:

  • USE_WEBVIEW

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.disable_gpu_accelerationBoolean

Disables GPU hardware acceleration for all subsequently created web views.

This can be useful when diagnosing rendering issues or when targeting machines with older or unsupported video cards. This must be called before creating any Wx::WEB::WebView instance. Once called, GPU acceleration will remain disabled for the lifetime of the application. true if the setting was applied successfully, false if it is not supported by the currently used backend.

Note:

This is currently only implemented for the Edge (MSW) and WebKit2GTK (GTK) backends.

Returns:

  • (Boolean)


1173
# File 'lib/wx/doc/gen/web/web_view.rb', line 1173

def self.disable_gpu_acceleration; end

Instance Method Details

#enable_persistent_storage(enable) ⇒ Boolean

Allows to disable persistent storage for the webview.

The default is to enable it. When the webview is created without persistent storage the data is stored in memory and is lost when the webview is destroyed. In browsers this is equivalent to "private browsing" or "incognito mode". true if the backend supports to modify this setting. false if the setting is not supported by the backend.

Note:

This is only implemented on the Edge, WebKit2GTK+ and macOS backends.

Parameters:

  • enable (Boolean)

Returns:

  • (Boolean)


1159
# File 'lib/wx/doc/gen/web/web_view.rb', line 1159

def enable_persistent_storage(enable) end

#get_backendString Also known as: backend

Returns the backend identifier for which this configuration was created.

Returns:

  • (String)


1117
# File 'lib/wx/doc/gen/web/web_view.rb', line 1117

def get_backend; end

#get_data_pathString Also known as: data_path

Returns the data path for the webview.

This is the path where the webview stores its data, such as cookies, local storage, etc. The path to the data directory.

Note:

This is used by Edge, WebKit2GTK+ and Chromium backends and always returns empty string for the other ones.

Returns:

  • (String)


1144
# File 'lib/wx/doc/gen/web/web_view.rb', line 1144

def get_data_path; end

#set_data_path(path) ⇒ void Also known as: data_path=

This method returns an undefined value.

Set the data path for the webview.

This is the path where the webview stores its data, such as cookies, local storage, etc.

Note:

This is used by Edge, WebKit2GTK+ and Chromium backends (the latter creates "UserData" subdirectory under the given path).

Parameters:

  • path (String)

    The path to the data directory.



1131
# File 'lib/wx/doc/gen/web/web_view.rb', line 1131

def set_data_path(path) end