openharmony 鸿蒙 arkts-basic-components-web-WebContextMenuResult

2026-08-25 浏览 (1)

Class (WebContextMenuResult)

Implements a WebContextMenuResult object. For details about the sample code, see onContextMenuShow.

NOTE

  • 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.

constructor9+

constructor()

Constructs a WebContextMenuResult object.

System capability: SystemCapability.Web.Webview.Core

closeContextMenu9+

closeContextMenu(): void

Closes this context menu. This API must be called when no operations in WebContextMenuResult are performed.

System capability: SystemCapability.Web.Webview.Core

copyImage9+

copyImage(): void

Copies the image specified in WebContextMenuParam.

System capability: SystemCapability.Web.Webview.Core

copy9+

copy(): void

Copies text related to this context menu.

System capability: SystemCapability.Web.Webview.Core

paste9+

paste(): void

Performs the paste operation related to this context menu.

NOTE

The ohos.permission.READ_PASTEBOARD permission must be declared.

System capability: SystemCapability.Web.Webview.Core

cut9+

cut(): void

Performs the cut operation related to this context menu.

System capability: SystemCapability.Web.Webview.Core

selectAll9+

selectAll(): void

Performs the select all operation related to this context menu.

System capability: SystemCapability.Web.Webview.Core

undo20+

undo(): void

Performs the undo operation related to this context menu.

System capability: SystemCapability.Web.Webview.Core

redo20+

redo(): void

Performs the redo operation related to this context menu, that is, cancels the last undo operation.

System capability: SystemCapability.Web.Webview.Core

pasteAndMatchStyle20+

pasteAndMatchStyle(): void

Performs the paste operation related to the context menu. The pasted content matches the target format and is displayed in plain text.

NOTE

The ohos.permission.READ_PASTEBOARD permission must be declared.

System capability: SystemCapability.Web.Webview.Core

requestPasswordAutoFill23+

requestPasswordAutoFill(): void

Requests the username or password data in the password vault to be automatically filled in the current focused text box.

System capability: SystemCapability.Web.Webview.Core

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-webview-WebviewController

openharmony 鸿蒙 arkts-apis-webview-t

openharmony 鸿蒙 arkts-apis-webview

openharmony 鸿蒙 capi-arkweb-type-h

openharmony 鸿蒙 arkts-basic-components-web-FullScreenExitHandler

openharmony 鸿蒙 arkts-apis-webview-WebDownloadManager

openharmony 鸿蒙 arkts-basic-components-web-VerifyPinHandler

openharmony 鸿蒙 capi-web-arkweb-webmessage8h

openharmony 鸿蒙 arkts-apis-webview-NativeMediaPlayerHandler

openharmony 鸿蒙 capi-web-arkweb-proxymethodwithresult

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/UjGqPk0x