Implements a WebContextMenuResult object. For details about the sample code, see onContextMenuShow.
The initial APIs of this component are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
The initial APIs of this class are supported since API version 9.
The sample effect is subject to the actual device.
constructor()
Constructs a WebContextMenuResult object.
System capability: SystemCapability.Web.Webview.Core
copyImage(): void
Copies the image specified in WebContextMenuParam.
System capability: SystemCapability.Web.Webview.Core
copy(): void
Copies text related to this context menu.
System capability: SystemCapability.Web.Webview.Core
paste(): void
Performs the paste operation related to this context menu.
The ohos.permission.READ_PASTEBOARD permission must be declared.
System capability: SystemCapability.Web.Webview.Core
cut(): void
Performs the cut operation related to this context menu.
System capability: SystemCapability.Web.Webview.Core
selectAll(): void
Performs the select all operation related to this context menu.
System capability: SystemCapability.Web.Webview.Core
undo(): void
Performs the undo operation related to this context menu.
System capability: SystemCapability.Web.Webview.Core
redo(): void
Performs the redo operation related to this context menu, that is, cancels the last undo operation.
System capability: SystemCapability.Web.Webview.Core
pasteAndMatchStyle(): void
Performs the paste operation related to the context menu. The pasted content matches the target format and is displayed in plain text.
The ohos.permission.READ_PASTEBOARD permission must be declared.
System capability: SystemCapability.Web.Webview.Core