Signal

WebKit2WebExtensionWebPage::context-menu

since: 2.8

Declaration

gboolean
context_menu (
  WebKitWebPage* self,
  WebKitContextMenu* context_menu,
  WebKitWebHitTestResult* hit_test_result,
  gpointer user_data
)

Description [src]

Emitted before a context menu is displayed in the UI Process to give the application a chance to customize the proposed menu, build its own context menu or pass user data to the UI Process. This signal is useful when the information available in the UI Process is not enough to build or customize the context menu, for example, to add menu entries depending on the node at the coordinates of the hit_test_result. Otherwise, it’s recommended to use WebKitWebView::context-menu signal instead.

Default handler:

The default handler is called after the handlers added via g_signal_connect().

Available since: 2.8

Parameters

context_menu

Type: WebKitContextMenu

The proposed WebKitContextMenu.

The data is owned by the caller of the function.
hit_test_result

Type: WebKitWebHitTestResult

A WebKitWebHitTestResult.

The data is owned by the caller of the function.

Return value

Type: gboolean

TRUE if the proposed context_menu has been modified, or FALSE otherwise.