The OpenD Programming Language

ICoreWebView2ContextMenuRequestedEventArgs

Undocumented in source.

Members

Functions

GetDeferral
HRESULT GetDeferral(ICoreWebView2Deferral* deferral)

Returns an ICoreWebView2Deferral object. Use this operation to complete the event when the custom context menu is closed.

get_ContextMenuTarget
HRESULT get_ContextMenuTarget(ICoreWebView2ContextMenuTarget* value)

Gets the target information associated with the requested context menu. See ICoreWebView2ContextMenuTarget for more details.

get_Handled
HRESULT get_Handled(BOOL* value)

Gets whether the ContextMenuRequested event is handled by host.

get_Location
HRESULT get_Location(POINT* value)

Gets the coordinates where the context menu request occurred in relation to the upper left corner of the WebView bounds.

get_MenuItems
HRESULT get_MenuItems(ICoreWebView2ContextMenuItemCollection* value)

Gets the collection of ContextMenuItem objects. See ICoreWebView2ContextMenuItemCollection for more details.

get_SelectedCommandId
HRESULT get_SelectedCommandId(INT32* value)

Gets the selected CommandId.

put_Handled
HRESULT put_Handled(BOOL value)

Sets whether the ContextMenuRequested event is handled by host after the event handler completes or if there is a deferral then after the deferral is completed. If Handled is set to TRUE then WebView will not display a context menu and will instead use the SelectedCommandId property to indicate which, if any, context menu item command to invoke. If after the event handler or deferral completes Handled is set to FALSE then WebView will display a context menu based on the contents of the MenuItems property. The default value is FALSE.

put_SelectedCommandId
HRESULT put_SelectedCommandId(INT32 value)

Sets the selected context menu item's command ID. When this is set, WebView will execute the selected command. This value should always be obtained via the selected ContextMenuItem's CommandId property. The default value is -1 which means that no selection occurred. The app can also report the selected command ID for a custom context menu item, which will cause the CustomItemSelected event to be fired for the custom item, however while command IDs for each custom context menu item is unique during a ContextMenuRequested event, CoreWebView2 may reassign command ID values of deleted custom ContextMenuItems to new objects and the command ID assigned to the same custom item can be different between each app runtime.

Meta