1# ArkWeb_ComponentAPI 2 3 4## Overview 5 6Defines a native component API. 7 8**Since**: 12 9 10**Related module**: [Web](_web.md) 11 12 13## Summary 14 15 16### Member Variables 17 18| Name| Description| 19| -------- | -------- | 20| size_t [size](#size) | The size of a struct. | 21| void(\* [onControllerAttached](#oncontrollerattached) )(const char \*webTag, [ArkWeb_OnComponentCallback](_web.md#arkweb_oncomponentcallback) callback, void \*userData) | Callback triggered when a controller is attached to the web component. | 22| void(\* [onPageBegin](#onpagebegin) )(const char \*webTag, [ArkWeb_OnComponentCallback](_web.md#arkweb_oncomponentcallback) callback, void \*userData) | Callback 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. | 23| void(\* [onPageEnd](#onpageend) )(const char \*webTag, [ArkWeb_OnComponentCallback](_web.md#arkweb_oncomponentcallback) callback, void \*userData) | Callback triggered when the web page loading is complete. This callback is triggered only for the main frame content. | 24| void(\* [onDestroy](#ondestroy) )(const char \*webTag, [ArkWeb_OnComponentCallback](_web.md#arkweb_oncomponentcallback) callback, void \*userData) | Callback triggered when this web component is destroyed. | 25 26 27## Member Variable Description 28 29 30### onControllerAttached 31 32``` 33void(* ArkWeb_ComponentAPI::onControllerAttached) (const char *webTag, ArkWeb_OnComponentCallback callback, void *userData) 34``` 35**Description** 36 37Callback triggered when a controller is attached to the web component. 38 39 40### onDestroy 41 42``` 43void(* ArkWeb_ComponentAPI::onDestroy) (const char *webTag, ArkWeb_OnComponentCallback callback, void *userData) 44``` 45**Description** 46 47Callback triggered when this web component is destroyed. 48 49 50### onPageBegin 51 52``` 53void(* ArkWeb_ComponentAPI::onPageBegin) (const char *webTag, ArkWeb_OnComponentCallback callback, void *userData) 54``` 55**Description** 56 57Callback 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. 58 59 60### onPageEnd 61 62``` 63void(* ArkWeb_ComponentAPI::onPageEnd) (const char *webTag, ArkWeb_OnComponentCallback callback, void *userData) 64``` 65**Description** 66 67Callback triggered when the web page loading is complete. This callback is triggered only for the main frame content. 68 69 70### size 71 72``` 73size_t ArkWeb_ComponentAPI::size 74``` 75**Description** 76 77The size of a struct. 78