### Namespace

# WebKit – 6.0

The WebKit library

Version | 2.48.0
Authors | The WebKit GTK and WPE teams
License | BSD, LGPL-2.1
Website | https://webkit.org
Source |

#### Build

C headers | `webkit/webkit.h`
pkg-config files | `webkitgtk-6.0`

#### Dependencies

GObject—2.0 | The base type system library
| Browse documentation
Gio—2.0 | GObject Interfaces and Objects, Networking, IPC, and I/O
| Browse documentation
Gtk—4.0 | The GTK widget toolkit
| Browse documentation
Soup—3.0 | HTTP client/server library
| Browse documentation

#### Additional documentation

- Overview
- Environment variables
- Profiling
- Remote Web Inspector
- Migrating WebKitGTK Applications to GTK 4
- Classes Hierarchy

#### Classes

AuthenticationRequest | Represents an authentication request. unstable since: 6.0
AutomationSession | Automation Session. since: 2.18
BackForwardList | List of visited pages. unstable since: 6.0
BackForwardListItem | One item of the `WebKitBackForwardList`. unstable since: 6.0
ClipboardPermissionRequest | A permission request for reading clipboard contents. since: 2.42
ColorChooserRequest | A request to open a color chooser. unstable since: 6.0
ContextMenu | Represents the context menu in a `WebKitWebView`. unstable since: 6.0
ContextMenuItem | One item of a `WebKitContextMenu`. unstable since: 6.0
CookieManager | Defines how to handle cookies in a `WebKitWebContext`. unstable since: 6.0
DeviceInfoPermissionRequest | A permission request for accessing user’s audio/video devices. since: 2.24
Download | Object used to communicate with the application when downloading. unstable since: 6.0
EditorState | Web editor state. since: 2.10
FaviconDatabase | Provides access to the icons associated with web sites. unstable since: 6.0
FileChooserRequest | A request to open a file chooser. unstable since: 6.0
FindController | Controls text search in a `WebKitWebView`. unstable since: 6.0
FormSubmissionRequest | Represents a form submission request. unstable since: 6.0
GeolocationManager | Geolocation manager. since: 2.26
GeolocationPermissionRequest | A permission request for sharing the user’s location. unstable since: 6.0
HitTestResult | Result of a Hit Test. unstable since: 6.0
InputMethodContext | Base class for input method contexts. since: 2.28
MediaKeySystemPermissionRequest | A permission request for using an EME Content Decryption Module. unstable since: 6.0
NavigationPolicyDecision | A policy decision for navigation actions. unstable since: 6.0
NetworkSession | Manages network configuration. since: 2.40
Notification | Holds information about a notification that should be shown to the user. since: 2.8
NotificationPermissionRequest | A permission request for displaying web notifications. since: 2.8
OptionMenu | Represents the dropdown menu of a `select` element in a `WebKitWebView`. since: 2.18
PointerLockPermissionRequest | A permission request for locking the pointer. since: 2.28
PolicyDecision | A pending policy decision. unstable since: 6.0
PrintOperation | Controls a print operation. unstable since: 6.0
ResponsePolicyDecision | A policy decision for resource responses. unstable since: 6.0
SecurityManager | Controls security settings in a `WebKitWebContext`. unstable since: 6.0
Settings | Control the behaviour of a `WebKitWebView`. unstable since: 6.0
URIRequest | Represents a URI request. unstable since: 6.0
URIResponse | Represents an URI response. unstable since: 6.0
URISchemeRequest | Represents a URI scheme request. unstable since: 6.0
URISchemeResponse | Represents a URI scheme response. unstable since: 6.0
UserContentFilterStore | Handles storage of user content filters on disk. since: 2.24
UserContentManager | Manages user-defined content which affects web pages. since: 2.6
UserMediaPermissionRequest | A permission request for accessing user’s audio/video devices. since: 2.8
UserMessage | Message that can be sent between the UI process and web process extensions. since: 2.28
WebContext | Manages aspects common to all `WebKitWebView`s. unstable since: 6.0
WebInspector | Access to the WebKit inspector. unstable since: 6.0
WebResource | Represents a resource at the end of a URI. unstable since: 6.0
WebsiteDataAccessPermissionRequest | A permission request for accessing website data from third-party domains. since: 2.30
WebsiteDataManager | Manages data stored locally by web sites. since: 2.10
WebsitePolicies | View specific website policies. since: 2.30
WebView | The central class of the WPE WebKit and WebKitGTK APIs. unstable since: 6.0
WebViewBase | unstable since: 6.0
WindowProperties | Window properties of a `WebKitWebView`. unstable since: 6.0

#### Interfaces

PermissionRequest | A permission request. unstable since: 6.0

#### Structs

ApplicationInfo | Information about an application running in automation mode. unstable since: 6.0
Credential | Groups information used for user authentication. since: 2.2
Feature | Describes a web engine feature that may be toggled at runtime. since: 2.42
FeatureList | Contains a set of toggle-able web engine features. since: 2.42
GeolocationPosition | An opaque struct to provide position updates to a `WebKitGeolocationManager`. since: 2.26
InputMethodUnderline | Range of text in an preedit string to be shown underlined. since: 2.28
ITPFirstParty | Describes a first party origin. since: 2.30
ITPThirdParty | Describes a third party origin. since: 2.30
MemoryPressureSettings | A boxed type representing the settings for the memory pressure handler. since: 2.34
NavigationAction | Provides details about interaction resulting in a resource load. unstable since: 6.0
NetworkProxySettings | Configures network proxies. since: 2.16
OptionMenuItem | One item of a `WebKitOptionMenu`. since: 2.18
PermissionStateQuery | This query represents a user’s choice to allow or deny access to “powerful features” of the platform, as specified in the Permissions W3C Specification. unstable since: 6.0
ScriptDialog | Carries details to be shown in user-facing dialogs. unstable since: 6.0
ScriptMessageReply | A reply for a script message received. If no reply has been sent by the user, an automatically generated reply with undefined value with be sent. since: 2.40
SecurityOrigin | A security boundary for websites. since: 2.16
UserContentFilter | A compiled set of rules which applied to resource loads. since: 2.24
UserScript | A JavaScript snippet which can be injected in loaded pages. since: 2.6
UserStyleSheet | A CSS style sheet which can be injected in loaded pages. since: 2.6
WebExtensionMatchPattern | Represents a way to specify a group of URLs for use in WebExtensions. since: 2.48
WebsiteData | Data stored locally by a web site. since: 2.16
WebViewSessionState | Handles serialization of a web view’s browsing state. since: 2.12

#### Enumerations

AuthenticationScheme | Enum values representing the authentication scheme. since: 2.2
AutomationBrowsingContextPresentation | Enum values used for determining the automation browsing context presentation. since: 2.28
AutoplayPolicy | Enum values used to specify autoplay policies. since: 2.30
CacheModel | Enum values used for determining the `WebKitWebContext` cache model. unstable since: 6.0
ContextMenuAction | Enum values used to denote the stock actions for `WebKitContextMenuItem`s. unstable since: 6.0
CookieAcceptPolicy | Enum values used to denote the cookie acceptance policies. unstable since: 6.0
CookiePersistentStorage | Enum values used to denote the cookie persistent storage types. unstable since: 6.0
CredentialPersistence | Enum values representing the duration for which a credential persists. since: 2.2
FeatureStatus | Describes the status of a `WebKitFeature`. since: 2.42
HardwareAccelerationPolicy | Enum values used for determining the hardware acceleration policy. since: 2.16
InputPurpose | Enum values used to describe the primary purpose of the active editable element. since: 2.28
InsecureContentEvent | Enum values previously used to denote the different events which can trigger the detection of insecure content. Since 2.46, WebKit generally no longer loads insecure content in secure contexts. unstable deprecated: 2.46 since: 6.0
LoadEvent | Enum values used to denote the different events that happen during a `WebKitWebView` load operation. unstable since: 6.0
MediaCaptureState | Enum values used to specify the capture state of a media device. since: 2.34
NavigationType | Enum values used to denote the various navigation types. unstable since: 6.0
NetworkProxyMode | Enum values used to set the network proxy mode. since: 2.16
PermissionState | Enum values representing query permission results. since: 2.40
PolicyDecisionType | Enum values used for determining the type of a policy decision during `WebKitWebView::decide-policy`. unstable since: 6.0
PrintOperationResponse | Enum values representing the response of the print dialog shown with webkit_print_operation_run_dialog(). unstable since: 6.0
SaveMode | Enum values to specify the different ways in which a `WebKitWebView` can save its current web page into a self-contained file. unstable since: 6.0
ScriptDialogType | Enum values used for determining the type of `WebKitScriptDialog`. unstable since: 6.0
SnapshotRegion | Enum values used to specify the region from which to get a `WebKitWebView` snapshot. unstable since: 6.0
TLSErrorsPolicy | Enum values used to denote the TLS errors policy. unstable since: 6.0
UserContentInjectedFrames | Specifies in which frames user style sheets are to be inserted in. since: 2.6
UserScriptInjectionTime | Specifies at which place of documents an user script will be inserted. since: 2.6
UserStyleLevel | Specifies how to treat an user style sheet. since: 2.6
WebExtensionMode | Enum values used for setting if a `WebKitWebView` is intended for WebExtensions. since: 2.38
WebProcessTerminationReason | Enum values used to specify the reason why the web process terminated abnormally. since: 2.20

#### Bitfields

EditorTypingAttributes | Enum values with flags representing typing attributes. since: 2.10
FindOptions | Enum values used to specify search options. unstable since: 6.0
HitTestResultContext | Enum values with flags representing the context of a `WebKitHitTestResult`. unstable since: 6.0
InputHints | Enum values used to describe hints that might be taken into account by input methods. since: 2.28
SnapshotOptions | Enum values used to specify options when taking a snapshot from a `WebKitWebView`. unstable since: 6.0
WebExtensionMatchPatternOptions | Enum values representing matching options. since: 2.48
WebsiteDataTypes | Enum values with flags representing types of Website data. since: 2.16

#### Error Domains

DownloadError | Enum values used to denote the various download errors. unstable since: 6.0
FaviconDatabaseError | Enum values used to denote the various errors related to the `WebKitFaviconDatabase`. unstable since: 6.0
JavascriptError | Enum values used to denote errors happening when executing JavaScript. unstable since: 6.0
MediaError | Enum values used to denote the various media errors. since: 2.40
NetworkError | Enum values used to denote the various network errors. unstable since: 6.0
PolicyError | Enum values used to denote the various policy errors. unstable since: 6.0
PrintError | Enum values used to denote the various print errors. unstable since: 6.0
SnapshotError | Enum values used to denote errors happening when creating snapshots of `WebKitWebView`. unstable since: 6.0
UserContentFilterError | Errors that can occur while compiling content filters. since: 2.24
UserMessageError | Enum values used to denote errors happening when sending user messages. since: 2.28
WebExtensionMatchPatternError | Enum values used to denote errors happening when creating a `WebKitWebExtensionMatchPattern`. unstable since: 6.0

#### Callbacks

URISchemeRequestCallback | Type definition for a function that will be called back when an URI request is made for a user registered URI scheme. unstable since: 6.0

#### Functions

get_major_version | Returns the major version number of the WebKit library. unstable since: 6.0
get_micro_version | Returns the micro version number of the WebKit library. unstable since: 6.0
get_minor_version | Returns the minor version number of the WebKit library. unstable since: 6.0
media_key_system_permission_get_name | Get the key system for which access permission is being requested. since: 2.32
uri_for_display | Use this function to format a URI for display. since: 2.24
user_media_permission_is_for_audio_device | Check whether the permission request is for an audio device. since: 2.8
user_media_permission_is_for_display_device | Check whether the permission request is for a display device. since: 2.34
user_media_permission_is_for_video_device | Check whether the permission request is for a video device. since: 2.8

#### Function Macros

CHECK_VERSION | Check the version of the WebKit headers at compilation time. unstable since: 6.0
DECLARE_DERIVABLE_TYPE | unstable since: 6.0
DECLARE_FINAL_TYPE | unstable since: 6.0
DECLARE_TYPE | unstable since: 6.0
DEPRECATED_FOR | Marks a symbol as deprecated, indicating a replacement. unstable since: 6.0

#### Constants

EDITING_COMMAND_COPY | The copy clipboard command. Copies the current selection inside a `WebKitWebView` to the clipboard. You can check whether it’s possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it’s possible to copy to the clipboard when there is an active selection inside the `WebKitWebView`. unstable since: 6.0
EDITING_COMMAND_CREATE_LINK | The create link command. Creates a link element that is inserted at the current cursor position. If there’s a selection, the selected text will be used as the link text, otherwise the URL itself will be used. It receives the link URL as argument. This command should be executed with `webkit_web_view_execute_editing_command_with_argument()` unstable since: 6.0

EDITING_COMMAND_CUT

The cut clipboard command. Copies the current selection inside a `WebKitWebView` to the clipboard and deletes the selected content. You can check whether it’s possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it’s possible to cut to the clipboard when the `WebKitWebView` content is editable and there is an active selection.

unstable since: 6.0

EDITING_COMMAND_INSERT_IMAGE | The insert image command. Creates an image element that is inserted at the current cursor position. It receives an URI as argument, that is used as the image source. This command should be executed with webkit_web_view_execute_editing_command_with_argument(). unstable since: 6.0
EDITING_COMMAND_PASTE | The paste clipboard command. Pastes the contents of the clipboard to a `WebKitWebView`. You can check whether it’s possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it’s possible to paste from the clipboard when the `WebKitWebView` content is editable and clipboard is not empty. unstable since: 6.0

EDITING_COMMAND_PASTE_AS_PLAIN_TEXT

The paste as plaintext clipboard command. Pastes the contents of the clipboard to a `WebKitWebView`, with formatting removed. You can check whether it’s possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it’s possible to paste from the clipboard when the `WebKitWebView` content is editable and clipboard is not empty.

unstable since: 6.0

EDITING_COMMAND_REDO | The redo command. Redoes a previously undone editing command in a `WebKitWebView`. You can check whether it’s possible to execute the command with webkit_web_view_can_execute_editing_command(). It’s only possible to redo a command when it has been previously undone. unstable since: 6.0
EDITING_COMMAND_SELECT_ALL | The select all command. Selects all the content of the current text field in a `WebKitWebView`. It is always possible to select all text, no matter whether the `WebKitWebView` content is editable or not. You can still check it with webkit_web_view_can_execute_editing_command(). unstable since: 6.0
EDITING_COMMAND_UNDO | The undo command. Undoes the last editing command in a `WebKitWebView`. You can check whether it’s possible to execute the command with webkit_web_view_can_execute_editing_command(). It’s only possible to undo a command after a previously executed editing operation. unstable since: 6.0
MAJOR_VERSION | Like webkit_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time. unstable since: 6.0
MICRO_VERSION | Like webkit_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time. unstable since: 6.0
MINOR_VERSION | Like webkit_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time. unstable since: 6.0