WebKit2.ContextMenuItem.new_from_stock_action_with_label
function new_from_stock_action_with_label(action: WebKit2.ContextMenuAction, label: String): WebKit2.ContextMenuItem { // Gjs wrapper for webkit_context_menu_item_new_from_stock_action_with_label() }
Creates a new WebKit2.ContextMenuItem for the given stock action using the given label. Stock actions have a predefined label, this method can be used to create a WebKit2.ContextMenuItem for a WebKit2.ContextMenuAction but using a custom label.
- action
a WebKit2.ContextMenuAction stock action
- label
a custom label text to use instead of the predefined one
- Returns
the newly created WebKit2.ContextMenuItem object.