letisSupportTpl:boolean=data;// The value **true** means that the template of the **downloadTemplate** type is supported; and false means the opposite.
letisSupportTpl:boolean=data;// The value true means that the template of the downloadTemplate type is supported, and false means the opposite.
The **Webview** module provides APIs for web control.
The **Webview** module provides APIs for web control. It can be used with the **[<Web\>](../arkui-ts/ts-basic-components-web.md)** component, which can be used to display web pages.
> **NOTE**
>
...
...
@@ -20,7 +20,7 @@ The **Webview** module provides APIs for web control.
| boolean | Whether any saved HTTP authentication credentials exist. Returns **true** if any saved HTTP authentication credentials exist; returns **false** otherwise.|
| boolean | Whether any saved HTTP authentication credentials exist. Returns **true** if any saved HTTP authentication credentials exist; returns **false** otherwise.|
**Example**
...
...
@@ -4730,3 +4793,4 @@ Defines a custom URL scheme.
| schemeName | string | Yes | Yes | Name of the custom URL scheme. The value can contain a maximum of 32 characters and include only lowercase letters, digits, periods (.), plus signs (+), and hyphens (-). |
| isSupportCORS | boolean | Yes | Yes | Whether to support cross-origin resource sharing (CORS). |
| isSupportFetch | boolean | Yes | Yes | Whether to support fetch requests. |
The **<Web\>** component can be used to display web pages.
The **<Web\>** component can be used to display web pages. It can be used with the [@ohos.web.webview](../apis/js-apis-webview.md) module, which provides APIs for web control.
| controller | [WebviewController<sup>9+</sup>](../apis/js-apis-webview.md#webviewcontroller)\|[WebController](#webcontroller) | Yes | Controller. **WebController** is deprecated since API version 9. You are advised to use **WebviewController** instead.|
| controller | [WebviewController<sup>9+</sup>](../apis/js-apis-webview.md#webviewcontroller)\|[WebController](#webcontroller) | Yes | - | Controller. **WebController** is deprecated since API version 9. You are advised to use **WebviewController** instead.|
@@ -2480,7 +2527,7 @@ Registers a callback for window creation.
| isAlert | boolean | Whether to open the target URL in a new window. The value **true** means to open the target URL in a new window, and **false** means to open the target URL in a new tab.|
| isUserTrigger | boolean | Whether the creation is triggered by the user. The value **true** means that the creation is triggered by the user, and **false** means the opposite. |
| targetUrl | string | Target URL. |
| handler | [ControllerHandler](#controllerhandler9) | **WebController** instance for setting the new window. |
| handler | [ControllerHandler](#controllerhandler9) | **WebviewController** instance for setting the new window. |
**Example**
...
...
@@ -2521,10 +2568,12 @@ Registers a callback for window closure.
| retain | boolean | Yes | - | Whether the geolocation permission status can be saved to the system. You can manage the geolocation permissions saved to the system through [GeolocationPermissions<sup>9+</sup>](../apis/js-apis-webview.md#geolocationpermissions).|
## WebController
## MessageLevel
Implements a **WebController** to control the behavior of the **\<Web>** component. A **WebController** can control only one **\<Web>** component, and the APIs in the **WebController** can be invoked only after it has been bound to the target **\<Web>** component.
| Name | Description |
| ----- | :---- |
| Debug | Debug level.|
| Error | Error level.|
| Info | Information level.|
| Log | Log level.|
| Warn | Warning level. |
This API is deprecated since API version 9. You are advised to use [WebviewController<sup>9+</sup>](../apis/js-apis-webview.md#webviewcontroller).
## RenderExitReason
### Creating an Object
Enumerates the reasons why the rendering process exits.
| Default | The cache that has not expired is used to load the resources. If the resources do not exist in the cache, they will be obtained from the Internet.|
| None | The cache is used to load the resources. If the resources do not exist in the cache, they will be obtained from the Internet. |
| Online | The cache is not used to load the resources. All resources are obtained from the Internet. |
| Only | The cache alone is used to load the resources. |
## FileSelectorMode
| Name | Description |
| -------------------- | ---------- |
| FileOpenMode | Open and upload a file. |
| FileOpenMultipleMode | Open and upload multiple files. |
| FileOpenFolderMode | Open and upload a folder.|
| FileSaveMode | Save a file. |
## HitTestType
| Name | Description |
| ------------- | ------------------------ |
| EditText | Editable area. |
| Email | Email address. |
| HttpAnchor | Hyperlink whose **src** is **http**. |
| HttpAnchorImg | Image with a hyperlink, where **src** is **http**.|
| Img | HTML::img tag. |
| Map | Geographical address. |
| Phone | Phone number. |
| Unknown | Unknown content. |
## SslError<sup>9+</sup>
Enumerates the error codes returned by **onSslErrorEventReceive** API.
| Name | Description |
| ------------ | ----------- |
| Invalid | Minor error. |
| HostMismatch | The host name does not match. |
| DateInvalid | The certificate has an invalid date. |
| Untrusted | The certificate issuer is not trusted.|
Implements a **WebController** to control the behavior of the **\<Web>** component. A **WebController** can control only one **\<Web>** component, and the APIs in the **WebController** can be invoked only after it has been bound to the target **\<Web>** component.
This API is deprecated since API version 9. You are advised to use [WebviewController<sup>9+</sup>](../apis/js-apis-webview.md#webviewcontroller).
### Creating an Object
```
webController: WebController = new WebController()
```
### getCookieManager<sup>9+</sup>
getCookieManager(): WebCookie
Obtains the cookie management object of the **\<Web>** component.
Manages behavior of cookies in **\<Web>** components. All **\<Web>** components in an application share a **WebCookie**. You can use the **getCookieManager** API in **controller** to obtain the **WebCookie** for subsequent cookie management.
### setCookie<sup>9+</sup>
### setCookie<sup>(deprecated)</sup>
setCookie(url: string, value: string): boolean
Sets the cookie. This API returns the result synchronously. Returns **true** if the operation is successful; returns **false** otherwise.
This API is deprecated since API version 9. You are advised to use [setCookie<sup>9+</sup>](../apis/js-apis-webview.md#setcookie) instead.
**Parameters**
...
...
@@ -4326,7 +4498,7 @@ Sets the cookie. This API returns the result synchronously. Returns **true** if
| Default | The cache that has not expired is used to load the resources. If the resources do not exist in the cache, they will be obtained from the Internet.|
| None | The cache is used to load the resources. If the resources do not exist in the cache, they will be obtained from the Internet. |
| Online | The cache is not used to load the resources. All resources are obtained from the Internet. |
| Only | The cache alone is used to load the resources. |
## FileSelectorMode
| Name | Description |
| -------------------- | ---------- |
| FileOpenMode | Open and upload a file. |
| FileOpenMultipleMode | Open and upload multiple files. |
| FileOpenFolderMode | Open and upload a folder.|
| FileSaveMode | Save a file. |
## HitTestType
| Name | Description |
| ------------- | ------------------------ |
| EditText | Editable area. |
| Email | Email address. |
| HttpAnchor | Hyperlink whose **src** is **http**. |
| HttpAnchorImg | Image with a hyperlink, where **src** is **http**.|
| Img | HTML::img tag. |
| Map | Geographical address. |
| Phone | Phone number. |
| Unknown | Unknown content. |
## SslError<sup>9+</sup>
Enumerates the error codes returned by **onSslErrorEventReceive** API.
| Name | Description |
| ------------ | ----------- |
| Invalid | Minor error. |
| HostMismatch | The host name does not match. |
| DateInvalid | The certificate has an invalid date. |
| Untrusted | The certificate issuer is not trusted.|