openharmony 鸿蒙 capi-web-arkweb-componentapi

2026-08-25 浏览 (1)

ArkWeb_ComponentAPI

typedef struct {...} ArkWeb_ComponentAPI

Overview

Defines a native component API.

Since: 12

Related module: Web

Header file: arkweb_type.h

Summary

Member Variables

NameDescription
size_t sizeSize of the struct.

Member Functions

NameDescription
void (*onControllerAttached)(const char* webTag, ArkWeb_OnComponentCallback callback, void* userData)Triggered when a controller is attached to the Web component.
void (*onPageBegin)(const char* webTag, ArkWeb_OnComponentCallback callback, void* userData)Triggered when the web page starts to be loaded. This callback is called only for the main frame content, and not for the iframe or frameset content.
void (*onPageEnd)(const char* webTag, ArkWeb_OnComponentCallback callback, void* userData)Triggered when the web page loading is finished. This callback is called only for the main frame content, and not for the iframe or frameset content.
void (*onDestroy)(const char* webTag, ArkWeb_OnComponentCallback callback, void* userData)Triggered when this Web component is destroyed.

Member Function Description

onControllerAttached()

void (*onControllerAttached)(const char* webTag, ArkWeb_OnComponentCallback callback, void* userData)

Description

Triggered when a controller is attached to the Web component.

Parameters

NameDescription
const char* webTagName of the Web component.
ArkWeb_OnComponentCallback callbackCallback of onControllerAttached.
void* userDataUser-defined data.

onPageBegin()

void (*onPageBegin)(const char* webTag, ArkWeb_OnComponentCallback callback, void* userData)

Description

Triggered when the web page starts to be loaded. This callback is called only for the main frame content, and not for the iframe or frameset content.

Parameters

NameDescription
const char* webTagName of the Web component.
ArkWeb_OnComponentCallback callbackCallback of onPageBegin.
void* userDataUser-defined data.

onPageEnd()

void (*onPageEnd)(const char* webTag, ArkWeb_OnComponentCallback callback, void* userData)

Description

Triggered when the web page loading is finished. This callback is called only for the main frame content, and not for the iframe or frameset content.

Parameters

NameDescription
const char* webTagName of the Web component.
ArkWeb_OnComponentCallback callbackCallback of onPageEnd.
void* userDataUser-defined data.

onDestroy()

void (*onDestroy)(const char* webTag, ArkWeb_OnComponentCallback callback, void* userData)

Description

Triggered when this Web component is destroyed.

Parameters

NameDescription
const char* webTagName of the Web component.
ArkWeb_OnComponentCallback callbackCallback of onDestroy.
void* userDataUser-defined data.

你可能感兴趣的鸿蒙文章

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/MhA56uXo