ArkWeb provides Web components to display web page content in apps. You can use the components in the following scenarios:
Web page integration: Apps can use Web components to embed web page content to reduce development costs and improve development and O&M efficiency.
Web browsing: Browser apps can use Web components to open third-party web pages, browse web pages in traceless mode, and set advertisement blocking.
Applet: Host applications of applets can use Web components to render the pages of the applets, implement same-layer rendering, and take over video playback.
The Web component provides various capabilities for you to control web pages, including:
Web page loading: declarative loading and off-screen loading of web pages.
Lifecycle management: component lifecycle status change and web page loading status change notification.
Common attributes and events: User-Agent development guide, cookie and data storage management, fonts and Web dark mode adaptation, permission management, and more.
Interaction with the application UI: The custom text selection menu, context menu, and file upload page can interact with the application UI.
Apps interact with web pages through JavaScriptProxy.
Security and privacy: traceless browsing mode, advertisement blocking, and Secure Shield mode.
Maintenance and debugging capability: DevTools for debugging, crashpad for collecting crash information of the Web component, and troubleshooting white screen issues on web pages.
Other advanced capabilities: same-layer rendering with system components, network and media playback takeovers, Adding Password Vault for Web Pagesand custom input method for Web component text boxes.
To access online web pages through the Web component, you must add the network permission ohos.permission.INTERNET. For details about how to request the permission, see Declaring Permissions.
"requestPermissions":[
{
"name" : "ohos.permission.INTERNET"
}
], You can query the W3C standard support status on relevant websites based on the ArkWeb kernel version. For example: https://developer.mozilla.org/en-US/ and https://webassembly.org/features/.
Web kernel version: ArkWeb is developed based on the Google Chromium kernel. The following table lists the mapping between the system version and the Chromium version.
| System Version | Chromium Version |
|---|---|
| HarmonyOS 4.0 and earlier | M99 |
| HarmonyOS 4.1-5.1 | M114 |
| HarmonyOS 6.0 | M132 (default, recommended; see M114->M132 Migration Guide) M114 (optional; if your app needs to switch to this kernel, see M114 Kernel Adaptation Guide on HarmonyOS 6.0) |
| HarmonyOS 6.1 | M132 |
| HarmonyOS 7.0 | M144 (default, recommended; see M132->M144 Migration Guide) M132 (optional; if your app needs to switch to this kernel, see M132 Kernel Adaptation Guide on HarmonyOS 7.0) |