ContextMenuItem.newFromStockActionWithLabel

Creates a new #WebKitContextMenuItem for the given stock action using the given label.

Stock actions have a predefined label, this method can be used to create a #WebKitContextMenuItem for a #WebKitContextMenuAction but using a custom label.

Parameters

action webkitwebprocessextension.types.ContextMenuAction

a #WebKitContextMenuAction stock action

label string

a custom label text to use instead of the predefined one

Return Value

Type: webkitwebprocessextension.context_menu_item.ContextMenuItem

the newly created #WebKitContextMenuItem object.