interface ICoreWebView2ExperimentalContextMenuTarget

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2ExperimentalContextMenuTarget
  : public IUnknown

Represents the information regarding the context menu target.

Summary

Members Descriptions
get_FrameUri Gets the uri of the frame. Will match the PageUri if IsRequestedForMainFrame is TRUE.
get_HasLinkText Returns TRUE if the context menu is requested on text element that contains an anchor tag.
get_HasLinkUri Returns TRUE if the context menu is requested on HTML containing an anchor tag.
get_HasSelection Returns TRUE if the context menu is requested on a selection.
get_HasSourceUri Returns TRUE if the context menu is requested on HTML containing a source uri.
get_IsEditable Returns TRUE if the context menu is requested on an editable component.
get_IsRequestedForMainFrame Returns TRUE if the context menu was requested on the main frame and FALSE if invoked on another frame.
get_Kind Gets the kind of context that the user selected.
get_LinkText Gets the text of the link (if HasLinkText is TRUE, null otherwise).
get_LinkUri Gets the uri of the link (if HasLinkUri is TRUE, null otherwise).
get_PageUri Gets the uri of the page.
get_SelectionText Gets the selected text (if HasSelection is TRUE, null otherwise).
get_SourceUri Gets the active source uri of element (if HasSourceUri is TRUE, null otherwise).

Includes the context selected and the appropriate data used for the actions of a context menu.

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease 1.0.1010

Members

get_FrameUri

Gets the uri of the frame. Will match the PageUri if IsRequestedForMainFrame is TRUE.

public HRESULT get_FrameUri(LPWSTR * value)

get_HasLinkText

Returns TRUE if the context menu is requested on text element that contains an anchor tag.

public HRESULT get_HasLinkText(BOOL * value)

get_HasLinkUri

Returns TRUE if the context menu is requested on HTML containing an anchor tag.

public HRESULT get_HasLinkUri(BOOL * value)

get_HasSelection

Returns TRUE if the context menu is requested on a selection.

public HRESULT get_HasSelection(BOOL * value)

get_HasSourceUri

Returns TRUE if the context menu is requested on HTML containing a source uri.

public HRESULT get_HasSourceUri(BOOL * value)

get_IsEditable

Returns TRUE if the context menu is requested on an editable component.

public HRESULT get_IsEditable(BOOL * value)

get_IsRequestedForMainFrame

Returns TRUE if the context menu was requested on the main frame and FALSE if invoked on another frame.

public HRESULT get_IsRequestedForMainFrame(BOOL * value)

get_Kind

Gets the kind of context that the user selected.

public HRESULT get_Kind(COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND * value)

get_LinkText

Gets the text of the link (if HasLinkText is TRUE, null otherwise).

public HRESULT get_LinkText(LPWSTR * value)

get_LinkUri

Gets the uri of the link (if HasLinkUri is TRUE, null otherwise).

public HRESULT get_LinkUri(LPWSTR * value)

get_PageUri

Gets the uri of the page.

public HRESULT get_PageUri(LPWSTR * value)

get_SelectionText

Gets the selected text (if HasSelection is TRUE, null otherwise).

public HRESULT get_SelectionText(LPWSTR * value)

get_SourceUri

Gets the active source uri of element (if HasSourceUri is TRUE, null otherwise).

public HRESULT get_SourceUri(LPWSTR * value)