WebKit2.ContextMenu.new
function new(): WebKit2.ContextMenu {
// Gjs wrapper for webkit_context_menu_new()
}
Creates a new WebKit2.ContextMenu object to be used as a submenu of an existing WebKit2.ContextMenu. The context menu of a WebKit2.WebView is created by the view and passed as an argument of WebKit2.WebView::context-menu signal. To add items to the menu use WebKit2.ContextMenu.prototype.prepend, WebKit2.ContextMenu.prototype.append or WebKit2.ContextMenu.prototype.insert. See also WebKit2.ContextMenu.new_with_items to create a WebKit2.ContextMenu with a list of initial items.
- Returns
The newly created WebKit2.ContextMenu object