### Namespace

# WebKit2WebExtension – 4.1

The WebKit web extension and DOM library

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

#### Build

C headers | `webkit2/webkit-web-extension.h`
pkg-config files | `webkit2gtk-web-extension-4.1`

#### 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
Soup—3.0 | HTTP client/server library
| Browse documentation

#### Additional documentation

- Classes Hierarchy

#### Classes

ContextMenu | Represents the context menu in a `WebKitWebView`.
ContextMenuItem | One item of a `WebKitContextMenu`.
DOMAttr |
DOMBlob |
DOMCDATASection |
DOMCharacterData |
DOMClientRect |
DOMClientRectList |
DOMComment |
DOMCSSRule |
DOMCSSRuleList |
DOMCSSStyleDeclaration |
DOMCSSStyleSheet |
DOMCSSValue |
DOMDocument |
DOMDocumentFragment |
DOMDocumentType |
DOMDOMImplementation |
DOMDOMSelection |
DOMDOMTokenList |
DOMDOMWindow |
DOMElement |
DOMEntityReference |
DOMEvent |
DOMFile |
DOMFileList |
DOMHTMLAnchorElement |
DOMHTMLAppletElement |
DOMHTMLAreaElement |
DOMHTMLBaseElement |
DOMHTMLBaseFontElement |
DOMHTMLBodyElement |
DOMHTMLBRElement |
DOMHTMLButtonElement |
DOMHTMLCanvasElement |
DOMHTMLCollection |
DOMHTMLDirectoryElement |
DOMHTMLDivElement |
DOMHTMLDListElement |
DOMHTMLDocument |
DOMHTMLElement |
DOMHTMLEmbedElement |
DOMHTMLFieldSetElement |
DOMHTMLFontElement |
DOMHTMLFormElement |
DOMHTMLFrameElement |
DOMHTMLFrameSetElement |
DOMHTMLHeadElement |
DOMHTMLHeadingElement |
DOMHTMLHRElement |
DOMHTMLHtmlElement |
DOMHTMLIFrameElement |
DOMHTMLImageElement |
DOMHTMLInputElement |
DOMHTMLLabelElement |
DOMHTMLLegendElement |
DOMHTMLLIElement |
DOMHTMLLinkElement |
DOMHTMLMapElement |
DOMHTMLMarqueeElement |
DOMHTMLMenuElement |
DOMHTMLMetaElement |
DOMHTMLModElement |
DOMHTMLObjectElement |
DOMHTMLOListElement |
DOMHTMLOptGroupElement |
DOMHTMLOptionElement |
DOMHTMLOptionsCollection |
DOMHTMLParagraphElement |
DOMHTMLParamElement |
DOMHTMLPreElement |
DOMHTMLQuoteElement |
DOMHTMLScriptElement |
DOMHTMLSelectElement |
DOMHTMLStyleElement |
DOMHTMLTableCaptionElement |
DOMHTMLTableCellElement |
DOMHTMLTableColElement |
DOMHTMLTableElement |
DOMHTMLTableRowElement |
DOMHTMLTableSectionElement |
DOMHTMLTextAreaElement |
DOMHTMLTitleElement |
DOMHTMLUListElement |
DOMKeyboardEvent |
DOMMediaList |
DOMMouseEvent |
DOMNamedNodeMap |
DOMNode |
DOMNodeIterator |
DOMNodeList |
DOMObject |
DOMProcessingInstruction |
DOMRange |
DOMStyleSheet |
DOMStyleSheetList |
DOMText |
DOMTreeWalker |
DOMUIEvent |
DOMWheelEvent |
DOMXPathExpression |
DOMXPathResult |
Frame | A web page frame. since: 2.26
HitTestResult | Result of a Hit Test.
ScriptWorld |
URIRequest | Represents a URI request.
URIResponse | Represents an URI response.
UserMessage | Message that can be sent between the UI process and web process extensions. since: 2.28
WebEditor | Access to editing capabilities of a `WebKitWebPage`. since: 2.10
WebExtension | Represents an extension of the WebProcess.
WebFormManager | Form manager of a `WebKitWebPage` in a `WebKitScriptWorld`. since: 2.40
WebHitTestResult | Result of a Hit Test (Web Process Extensions). since: 2.8
WebPage | A loaded web page.

#### Interfaces

DOMEventTarget |
DOMNodeFilter |
DOMXPathNSResolver |

#### Structs

ConsoleMessage |

#### Enumerations

ConsoleMessageLevel | Enum values used to denote the various levels of console messages. since: 2.12
ConsoleMessageSource | Enum values used to denote the various sources of console messages. since: 2.12
ContextMenuAction | Enum values used to denote the stock actions for `WebKitContextMenuItem`s.
FormSubmissionStep | Used to indicate a particular stage in form submission. See `WebKitWebPage::will-submit-form`. deprecated: 2.40 since: 2.20
UserMessageError | Enum values used to denote errors happening when sending user messages. since: 2.28

#### Bitfields

HitTestResultContext | Enum values with flags representing the context of a `WebKitHitTestResult`.

#### Callbacks

WebExtensionInitializeFunction | Type definition for a function that will be called to initialize the web extension when the web process starts.
WebExtensionInitializeWithUserDataFunction | Type definition for a function that will be called to initialize the web extensions when the web process starts, and which receives as additional argument the user data set with webkit_web_context_set_web_extensions_initialization_user_data(). since: 2.4

#### Function Macros

DEPRECATED_FOR |
DOM_ATTR |
DOM_ATTR_CLASS |
DOM_BLOB |
DOM_BLOB_CLASS |
DOM_CDATA_SECTION |
DOM_CDATA_SECTION_CLASS |
DOM_CHARACTER_DATA |
DOM_CHARACTER_DATA_CLASS |
DOM_CLIENT_RECT |
DOM_CLIENT_RECT_CLASS |
DOM_CLIENT_RECT_LIST |
DOM_CLIENT_RECT_LIST_CLASS |
DOM_COMMENT |
DOM_COMMENT_CLASS |
DOM_CSS_RULE |
DOM_CSS_RULE_CLASS |
DOM_CSS_RULE_LIST |
DOM_CSS_RULE_LIST_CLASS |
DOM_CSS_STYLE_DECLARATION |
DOM_CSS_STYLE_DECLARATION_CLASS |
DOM_CSS_STYLE_SHEET |
DOM_CSS_STYLE_SHEET_CLASS |
DOM_CSS_VALUE |
DOM_CSS_VALUE_CLASS |
DOM_DOCUMENT |
DOM_DOCUMENT_CLASS |
DOM_DOCUMENT_FRAGMENT |
DOM_DOCUMENT_FRAGMENT_CLASS |
DOM_DOCUMENT_TYPE |
DOM_DOCUMENT_TYPE_CLASS |
DOM_DOM_IMPLEMENTATION |
DOM_DOM_IMPLEMENTATION_CLASS |
DOM_DOM_SELECTION |
DOM_DOM_SELECTION_CLASS |
DOM_DOM_TOKEN_LIST |
DOM_DOM_TOKEN_LIST_CLASS |
DOM_DOM_WINDOW |
DOM_DOM_WINDOW_CLASS |
DOM_ELEMENT |
DOM_ELEMENT_CLASS |
DOM_ENTITY_REFERENCE |
DOM_ENTITY_REFERENCE_CLASS |
DOM_EVENT |
DOM_EVENT_CLASS |
DOM_EVENT_TARGET |
DOM_EVENT_TARGET_CLASS |
DOM_FILE |
DOM_FILE_CLASS |
DOM_FILE_LIST |
DOM_FILE_LIST_CLASS |
DOM_HTML_ANCHOR_ELEMENT |
DOM_HTML_ANCHOR_ELEMENT_CLASS |
DOM_HTML_APPLET_ELEMENT |
DOM_HTML_APPLET_ELEMENT_CLASS |
DOM_HTML_AREA_ELEMENT |
DOM_HTML_AREA_ELEMENT_CLASS |
DOM_HTML_BASE_ELEMENT |
DOM_HTML_BASE_ELEMENT_CLASS |
DOM_HTML_BASE_FONT_ELEMENT |
DOM_HTML_BASE_FONT_ELEMENT_CLASS |
DOM_HTML_BODY_ELEMENT |
DOM_HTML_BODY_ELEMENT_CLASS |
DOM_HTML_BR_ELEMENT |
DOM_HTML_BR_ELEMENT_CLASS |
DOM_HTML_BUTTON_ELEMENT |
DOM_HTML_BUTTON_ELEMENT_CLASS |
DOM_HTML_CANVAS_ELEMENT |
DOM_HTML_CANVAS_ELEMENT_CLASS |
DOM_HTML_COLLECTION |
DOM_HTML_COLLECTION_CLASS |
DOM_HTML_D_LIST_ELEMENT |
DOM_HTML_D_LIST_ELEMENT_CLASS |
DOM_HTML_DIRECTORY_ELEMENT |
DOM_HTML_DIRECTORY_ELEMENT_CLASS |
DOM_HTML_DIV_ELEMENT |
DOM_HTML_DIV_ELEMENT_CLASS |
DOM_HTML_DOCUMENT |
DOM_HTML_DOCUMENT_CLASS |
DOM_HTML_ELEMENT |
DOM_HTML_ELEMENT_CLASS |
DOM_HTML_EMBED_ELEMENT |
DOM_HTML_EMBED_ELEMENT_CLASS |
DOM_HTML_FIELD_SET_ELEMENT |
DOM_HTML_FIELD_SET_ELEMENT_CLASS |
DOM_HTML_FONT_ELEMENT |
DOM_HTML_FONT_ELEMENT_CLASS |
DOM_HTML_FORM_ELEMENT |
DOM_HTML_FORM_ELEMENT_CLASS |
DOM_HTML_FRAME_ELEMENT |
DOM_HTML_FRAME_ELEMENT_CLASS |
DOM_HTML_FRAME_SET_ELEMENT |
DOM_HTML_FRAME_SET_ELEMENT_CLASS |
DOM_HTML_HEAD_ELEMENT |
DOM_HTML_HEAD_ELEMENT_CLASS |
DOM_HTML_HEADING_ELEMENT |
DOM_HTML_HEADING_ELEMENT_CLASS |
DOM_HTML_HR_ELEMENT |
DOM_HTML_HR_ELEMENT_CLASS |
DOM_HTML_HTML_ELEMENT |
DOM_HTML_HTML_ELEMENT_CLASS |
DOM_HTML_IFRAME_ELEMENT |
DOM_HTML_IFRAME_ELEMENT_CLASS |
DOM_HTML_IMAGE_ELEMENT |
DOM_HTML_IMAGE_ELEMENT_CLASS |
DOM_HTML_INPUT_ELEMENT |
DOM_HTML_INPUT_ELEMENT_CLASS |
DOM_HTML_LABEL_ELEMENT |
DOM_HTML_LABEL_ELEMENT_CLASS |
DOM_HTML_LEGEND_ELEMENT |
DOM_HTML_LEGEND_ELEMENT_CLASS |
DOM_HTML_LI_ELEMENT |
DOM_HTML_LI_ELEMENT_CLASS |
DOM_HTML_LINK_ELEMENT |
DOM_HTML_LINK_ELEMENT_CLASS |
DOM_HTML_MAP_ELEMENT |
DOM_HTML_MAP_ELEMENT_CLASS |
DOM_HTML_MARQUEE_ELEMENT |
DOM_HTML_MARQUEE_ELEMENT_CLASS |
DOM_HTML_MENU_ELEMENT |
DOM_HTML_MENU_ELEMENT_CLASS |
DOM_HTML_META_ELEMENT |
DOM_HTML_META_ELEMENT_CLASS |
DOM_HTML_MOD_ELEMENT |
DOM_HTML_MOD_ELEMENT_CLASS |
DOM_HTML_O_LIST_ELEMENT |
DOM_HTML_O_LIST_ELEMENT_CLASS |
DOM_HTML_OBJECT_ELEMENT |
DOM_HTML_OBJECT_ELEMENT_CLASS |
DOM_HTML_OPT_GROUP_ELEMENT |
DOM_HTML_OPT_GROUP_ELEMENT_CLASS |
DOM_HTML_OPTION_ELEMENT |
DOM_HTML_OPTION_ELEMENT_CLASS |
DOM_HTML_OPTIONS_COLLECTION |
DOM_HTML_OPTIONS_COLLECTION_CLASS |
DOM_HTML_PARAGRAPH_ELEMENT |
DOM_HTML_PARAGRAPH_ELEMENT_CLASS |
DOM_HTML_PARAM_ELEMENT |
DOM_HTML_PARAM_ELEMENT_CLASS |
DOM_HTML_PRE_ELEMENT |
DOM_HTML_PRE_ELEMENT_CLASS |
DOM_HTML_QUOTE_ELEMENT |
DOM_HTML_QUOTE_ELEMENT_CLASS |
DOM_HTML_SCRIPT_ELEMENT |
DOM_HTML_SCRIPT_ELEMENT_CLASS |
DOM_HTML_SELECT_ELEMENT |
DOM_HTML_SELECT_ELEMENT_CLASS |
DOM_HTML_STYLE_ELEMENT |
DOM_HTML_STYLE_ELEMENT_CLASS |
DOM_HTML_TABLE_CAPTION_ELEMENT |
DOM_HTML_TABLE_CAPTION_ELEMENT_CLASS |
DOM_HTML_TABLE_CELL_ELEMENT |
DOM_HTML_TABLE_CELL_ELEMENT_CLASS |
DOM_HTML_TABLE_COL_ELEMENT |
DOM_HTML_TABLE_COL_ELEMENT_CLASS |
DOM_HTML_TABLE_ELEMENT |
DOM_HTML_TABLE_ELEMENT_CLASS |
DOM_HTML_TABLE_ROW_ELEMENT |
DOM_HTML_TABLE_ROW_ELEMENT_CLASS |
DOM_HTML_TABLE_SECTION_ELEMENT |
DOM_HTML_TABLE_SECTION_ELEMENT_CLASS |
DOM_HTML_TEXT_AREA_ELEMENT |
DOM_HTML_TEXT_AREA_ELEMENT_CLASS |
DOM_HTML_TITLE_ELEMENT |
DOM_HTML_TITLE_ELEMENT_CLASS |
DOM_HTML_U_LIST_ELEMENT |
DOM_HTML_U_LIST_ELEMENT_CLASS |
DOM_KEYBOARD_EVENT |
DOM_KEYBOARD_EVENT_CLASS |
DOM_MEDIA_LIST |
DOM_MEDIA_LIST_CLASS |
DOM_MOUSE_EVENT |
DOM_MOUSE_EVENT_CLASS |
DOM_NAMED_NODE_MAP |
DOM_NAMED_NODE_MAP_CLASS |
DOM_NODE |
DOM_NODE_CLASS |
DOM_NODE_FILTER |
DOM_NODE_FILTER_CLASS |
DOM_NODE_ITERATOR |
DOM_NODE_ITERATOR_CLASS |
DOM_NODE_LIST |
DOM_NODE_LIST_CLASS |
DOM_OBJECT |
DOM_OBJECT_CLASS |
DOM_PROCESSING_INSTRUCTION |
DOM_PROCESSING_INSTRUCTION_CLASS |
DOM_RANGE |
DOM_RANGE_CLASS |
DOM_STYLE_SHEET |
DOM_STYLE_SHEET_CLASS |
DOM_STYLE_SHEET_LIST |
DOM_STYLE_SHEET_LIST_CLASS |
DOM_TEXT |
DOM_TEXT_CLASS |
DOM_TREE_WALKER |
DOM_TREE_WALKER_CLASS |
DOM_UI_EVENT |
DOM_UI_EVENT_CLASS |
DOM_WHEEL_EVENT |
DOM_WHEEL_EVENT_CLASS |
DOM_XPATH_EXPRESSION |
DOM_XPATH_EXPRESSION_CLASS |
DOM_XPATH_NS_RESOLVER |
DOM_XPATH_NS_RESOLVER_CLASS |
DOM_XPATH_RESULT |
DOM_XPATH_RESULT_CLASS |
URI_REQUEST |
URI_REQUEST_CLASS |
URI_RESPONSE |
URI_RESPONSE_CLASS |

#### Constants

DOM_CSS_RULE_CHARSET_RULE | deprecated: 2.22
DOM_CSS_RULE_FONT_FACE_RULE | deprecated: 2.22
DOM_CSS_RULE_IMPORT_RULE | deprecated: 2.22
DOM_CSS_RULE_MEDIA_RULE | deprecated: 2.22
DOM_CSS_RULE_PAGE_RULE | deprecated: 2.22
DOM_CSS_RULE_STYLE_RULE | deprecated: 2.22
DOM_CSS_RULE_UNKNOWN_RULE | deprecated: 2.22
DOM_CSS_VALUE_CSS_CUSTOM | deprecated: 2.22
DOM_CSS_VALUE_CSS_INHERIT | deprecated: 2.22
DOM_CSS_VALUE_CSS_PRIMITIVE_VALUE | deprecated: 2.22
DOM_CSS_VALUE_CSS_VALUE_LIST | deprecated: 2.22
DOM_ELEMENT_ALLOW_KEYBOARD_INPUT | deprecated: 2.22
DOM_EVENT_AT_TARGET | deprecated: 2.22
DOM_EVENT_BLUR | deprecated: 2.22
DOM_EVENT_BUBBLING_PHASE | deprecated: 2.22
DOM_EVENT_CAPTURING_PHASE | deprecated: 2.22
DOM_EVENT_CHANGE | deprecated: 2.22
DOM_EVENT_CLICK | deprecated: 2.22
DOM_EVENT_DBLCLICK | deprecated: 2.22
DOM_EVENT_DRAGDROP | deprecated: 2.22
DOM_EVENT_FOCUS | deprecated: 2.22
DOM_EVENT_KEYDOWN | deprecated: 2.22
DOM_EVENT_KEYPRESS | deprecated: 2.22
DOM_EVENT_KEYUP | deprecated: 2.22
DOM_EVENT_MOUSEDOWN | deprecated: 2.22
DOM_EVENT_MOUSEDRAG | deprecated: 2.22
DOM_EVENT_MOUSEMOVE | deprecated: 2.22
DOM_EVENT_MOUSEOUT | deprecated: 2.22
DOM_EVENT_MOUSEOVER | deprecated: 2.22
DOM_EVENT_MOUSEUP | deprecated: 2.22
DOM_EVENT_NONE | deprecated: 2.22
DOM_EVENT_SELECT | deprecated: 2.22
DOM_KEYBOARD_EVENT_KEY_LOCATION_LEFT | deprecated: 2.22
DOM_KEYBOARD_EVENT_KEY_LOCATION_NUMPAD | deprecated: 2.22
DOM_KEYBOARD_EVENT_KEY_LOCATION_RIGHT | deprecated: 2.22
DOM_KEYBOARD_EVENT_KEY_LOCATION_STANDARD | deprecated: 2.22
DOM_NODE_ATTRIBUTE_NODE | deprecated: 2.22
DOM_NODE_CDATA_SECTION_NODE | deprecated: 2.22
DOM_NODE_COMMENT_NODE | deprecated: 2.22
DOM_NODE_DOCUMENT_FRAGMENT_NODE | deprecated: 2.22
DOM_NODE_DOCUMENT_NODE | deprecated: 2.22
DOM_NODE_DOCUMENT_POSITION_CONTAINED_BY | deprecated: 2.22
DOM_NODE_DOCUMENT_POSITION_CONTAINS | deprecated: 2.22
DOM_NODE_DOCUMENT_POSITION_DISCONNECTED | deprecated: 2.22
DOM_NODE_DOCUMENT_POSITION_FOLLOWING | deprecated: 2.22
DOM_NODE_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | deprecated: 2.22
DOM_NODE_DOCUMENT_POSITION_PRECEDING | deprecated: 2.22
DOM_NODE_DOCUMENT_TYPE_NODE | deprecated: 2.22
DOM_NODE_ELEMENT_NODE | deprecated: 2.22
DOM_NODE_ENTITY_NODE | deprecated: 2.22
DOM_NODE_ENTITY_REFERENCE_NODE | deprecated: 2.22
DOM_NODE_FILTER_ACCEPT | Accept the node. Use this macro as return value of `webkit_dom_node_filter_accept_node()` implementation to accept the given `WebKitDOMNode`. deprecated: 2.22
DOM_NODE_FILTER_REJECT | Reject the node. Use this macro as return value of `webkit_dom_node_filter_accept_node()` implementation to reject the given `WebKitDOMNode`. The children of the given node will be rejected too. deprecated: 2.22
DOM_NODE_FILTER_SHOW_ALL | Show all nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_ATTRIBUTE | Show `WebKitDOMAttr` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_CDATA_SECTION | Show `WebKitDOMCDataSection` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_COMMENT | Show `WebKitDOMComment` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_DOCUMENT | Show `WebKitDOMDocument` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_DOCUMENT_FRAGMENT | Show `WebKitDOMDocumentFragment` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_DOCUMENT_TYPE | Show `WebKitDOMDocumentType` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_ELEMENT | Show `WebKitDOMElement` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_ENTITY | Show `WebKitDOMEntity` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_ENTITY_REFERENCE | Show `WebKitDOMEntityReference` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_NOTATION | Show `WebKitDOMNotation` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_PROCESSING_INSTRUCTION | Show `WebKitDOMProcessingInstruction` nodes. deprecated: 2.22
DOM_NODE_FILTER_SHOW_TEXT | Show `WebKitDOMText` nodes. deprecated: 2.22
DOM_NODE_FILTER_SKIP | Skip the node. Use this macro as return value of `webkit_dom_node_filter_accept_node()` implementation to skip the given `WebKitDOMNode`. The children of the given node will not be skipped. deprecated: 2.22
DOM_NODE_PROCESSING_INSTRUCTION_NODE | deprecated: 2.22
DOM_NODE_TEXT_NODE | deprecated: 2.22
DOM_RANGE_END_TO_END | deprecated: 2.22
DOM_RANGE_END_TO_START | deprecated: 2.22
DOM_RANGE_NODE_AFTER | deprecated: 2.22
DOM_RANGE_NODE_BEFORE | deprecated: 2.22
DOM_RANGE_NODE_BEFORE_AND_AFTER | deprecated: 2.22
DOM_RANGE_NODE_INSIDE | deprecated: 2.22
DOM_RANGE_START_TO_END | deprecated: 2.22
DOM_RANGE_START_TO_START | deprecated: 2.22
DOM_XPATH_RESULT_ANY_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_ANY_UNORDERED_NODE_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_BOOLEAN_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_FIRST_ORDERED_NODE_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_NUMBER_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_ORDERED_NODE_ITERATOR_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_ORDERED_NODE_SNAPSHOT_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_STRING_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_UNORDERED_NODE_ITERATOR_TYPE | deprecated: 2.22
DOM_XPATH_RESULT_UNORDERED_NODE_SNAPSHOT_TYPE | deprecated: 2.22