webkit.web_context
Module for [WebContext] class
Types 3
Manages aspects common to all #WebKitWebView<!-- -->s
The #WebKitWebContext manages all aspects common to all #WebKitWebView<!-- -->s.
You can define the #WebKitCacheModel with webkit.web_context.WebContext.setCacheModel, depending on the needs of your application. You can access the #WebKitSecurityManager to specify the behaviour of your application regarding security using webkit.web_context.WebContext.getSecurityManager.
It is also possible to change your preferred language or enable spell checking, using webkit.web_context.WebContext.setPreferredLanguages, webkit.web_context.WebContext.setSpellCheckingLanguages and webkit.web_context.WebContext.setSpellCheckingEnabled.
You can use webkit.web_context.WebContext.registerUriScheme to register custom URI schemes, and manage several other settings.
TLS certificate validation failure is now treated as a transport error by default. To handle TLS failures differently, you can connect to #WebKitWebView::load-failed-with-tls-errors. Alternatively, you can use webkit_web_context_set_tls_errors_policy() to set the policy webkit.types.TLSErrorsPolicy.Ignore; however, this is not appropriate for Internet applications.
WebContextGidBuilder builder() static nothrowGet builder for [webkit.web_context.WebContext] Returns: New builder objectstring timeZoneOverride() @property nothrowGet `timeZoneOverride` property. Returns: The timezone override for this web context. Setting this property provides a better alternative to configure the timezone information for all webviews mana...webkit.web_context.WebContext getDefault() static nothrowGets the default web context. Returns: a #WebKitWebContextwebkit.geolocation_manager.GeolocationManager getGeolocationManager() nothrowGet the #WebKitGeolocationManager of context. Returns: the #WebKitGeolocationManager of context.webkit.network_session.NetworkSession getNetworkSessionForAutomation() nothrowGet the #WebKitNetworkSession used for automation sessions started in context. Returns: a #WebKitNetworkSession, or null if automation is not enabledwebkit.security_manager.SecurityManager getSecurityManager() nothrowGet the #WebKitSecurityManager of context. Returns: the #WebKitSecurityManager of context.bool getSpellCheckingEnabled() nothrowGet whether spell checking feature is currently enabled. Returns: true If spell checking is enabled, or false otherwise.void initializeNotificationPermissions(webkit.security_origin.SecurityOrigin[] allowedOrigins, webkit.security_origin.SecurityOrigin[] disallowedOrigins) nothrowSets initial desktop notification permissions for the context.void registerUriScheme(string scheme, webkit.types.URISchemeRequestCallback callback) nothrowRegister scheme in context.void sendMessageToAllExtensions(webkit.user_message.UserMessage message) nothrowSend message to all web process extensions associated to context.void setSpellCheckingLanguages(string[] languages) nothrowSet the list of spell checking languages to be used for spell checking.void setWebProcessExtensionsDirectory(string directory) nothrowSet the directory where WebKit will look for web process extensions.void setWebProcessExtensionsInitializationUserData(glib.variant.Variant userData) nothrowSet user data to be passed to Web Extensions on initialization.gulong connectAutomationStarted(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : webkit.automation_session.AutomationSession)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : webkit.web_context.WebContext)))
&& Parameters!T.length < 3) nothrowConnect to `AutomationStarted` signal.gulong connectInitializeNotificationPermissions(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : webkit.web_context.WebContext)))
&& Parameters!T.length < 2) nothrowConnect to `InitializeNotificationPermissions` signal.gulong connectInitializeWebProcessExtensions(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : webkit.web_context.WebContext)))
&& Parameters!T.length < 2) nothrowConnect to `InitializeWebProcessExtensions` signal.gulong connectUserMessageReceived(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : webkit.user_message.UserMessage)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : webkit.web_context.WebContext)))
&& Parameters!T.length < 3) nothrowConnect to `UserMessageReceived` signal.Fluent builder implementation template for webkit.web_context.WebContext
T memoryPressureSettings(webkit.memory_pressure_settings.MemoryPressureSettings propval) nothrowSet `memoryPressureSettings` property. Params: propval = The #WebKitMemoryPressureSettings applied to the web processes created by this context. Returns: Builder instance for fluent chainingT timeZoneOverride(string propval) nothrowSet `timeZoneOverride` property. Params: propval = The timezone override for this web context. Setting this property provides a better alternative to configure the timezone information for all webv...Fluent builder for webkit.web_context.WebContext