| label | string | Yes| No| No| Label of the input method subtype.|
| label | string | Yes| No| Optional. Label of the input method subtype.|
| labelId<sup>10+</sup> | string | Yes| No| No| Label ID of the input method subtype.|
| labelId<sup>10+</sup> | string | Yes| No| Optional. Label ID of the input method subtype.|
| name | string | Yes| No| Yes| Bundle name of the input method.|
| name | string | Yes| No| Mandatory. Bundle name of the input method.|
| id | string | Yes| No| Yes| ID of the input method subtype.|
| id | string | Yes| No| Mandatory. ID of the input method subtype.|
| mode | string | Yes| No| No| Mode of the input method subtype, including **upper** (uppercase) and **lower** (lowercase).|
| mode | string | Yes| No| Optional. Mode of the input method subtype, including **upper** (uppercase) and **lower** (lowercase).|
| locale | string | Yes| No| Yes| Locale of the input method subtype.|
| locale | string | Yes| No| Mandatory. Locale of the input method subtype.|
| language | string | Yes| No| Yes| Language of the input method subtype.|
| language | string | Yes| No| Mandatory. Language of the input method subtype.|
| icon | string | Yes| No| No| Icon of the input method subtype.|
| icon | string | Yes| No| Optional. Icon of the input method subtype. It can be obtained by using **iconId**. This parameter is reserved.|
| iconId | number | Yes| No| No| Icon ID of the input method subtype.|
| iconId | number | Yes| No| Optional. Icon ID of the input method subtype.|
| extra | object | Yes| Yes| No| Extra information of the input method subtype.<br>**NOTE**<br>This parameter is optional since API version 10.|
| extra | object | Yes| Yes| Optional. Extra information of the input method subtype. This parameter is reserved and currently has no specific meaning.<br>**NOTE**<br>This parameter is optional since API version 10.|
@@ -35,9 +35,9 @@ Describes the input method application attributes.
...
@@ -35,9 +35,9 @@ Describes the input method application attributes.
| id<sup>9+</sup> | string | Yes| No| Mandatory. Unique ID of the input method.|
| id<sup>9+</sup> | string | Yes| No| Mandatory. Unique ID of the input method.|
| label<sup>9+</sup> | string | Yes| No| Optional. External name of the input method.|
| label<sup>9+</sup> | string | Yes| No| Optional. External name of the input method.|
| labelId<sup>10+</sup> | string | Yes| No| Optional. External ID of the input method.|
| labelId<sup>10+</sup> | string | Yes| No| Optional. External ID of the input method.|
| icon<sup>9+</sup> | string | Yes| No| Optional. Icon of the input method.|
| icon<sup>9+</sup> | string | Yes| No| Optional. Icon of the input method. It can be obtained by using **iconId**. This parameter is reserved.|
| iconId<sup>9+</sup> | number | Yes| No| Optional. Icon ID of the input method.|
| iconId<sup>9+</sup> | number | Yes| No| Optional. Icon ID of the input method.|
| extra<sup>9+</sup> | object | Yes| Yes| Extra information about the input method.<br>- API version 10 and later: optional<br>- API version 9: mandatory|
| extra<sup>9+</sup> | object | Yes| Yes| Extra information about the input method. This parameter is reserved and currently has no specific meaning.<br>- API version 10 and later: optional<br>- API version 9: mandatory|
| packageName<sup>(deprecated)</sup> | string | Yes| No| Name of the input method package. Mandatory.<br>**NOTE**<br>This API is supported since API version 8 and deprecated since API version 9. You are advised to use **name**.|
| packageName<sup>(deprecated)</sup> | string | Yes| No| Name of the input method package. Mandatory.<br>**NOTE**<br>This API is supported since API version 8 and deprecated since API version 9. You are advised to use **name**.|
| methodId<sup>(deprecated)</sup> | string | Yes| No| Unique ID of the input method. Mandatory.<br>**NOTE**<br>This API is supported since API version 8 and deprecated since API version 9. You are advised to use **id**.|
| methodId<sup>(deprecated)</sup> | string | Yes| No| Unique ID of the input method. Mandatory.<br>**NOTE**<br>This API is supported since API version 8 and deprecated since API version 9. You are advised to use **id**.|
...
@@ -154,15 +154,15 @@ Switches to another input method. This API uses a promise to return the result.
...
@@ -154,15 +154,15 @@ Switches to another input method. This API uses a promise to return the result.
**Parameters**
**Parameters**
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
|target | [InputMethodProperty](#inputmethodproperty8)| Yes| Input method to switch to.|
|target | [InputMethodProperty](#inputmethodproperty8)| Yes| Input method to switch to.|
| type | string | Yes | Listening type.<br>The value **'insertText'** indicates the text insertion event.|
| type | string | Yes | Listening type.<br>The value **'insertText'** indicates the text insertion event.|
| callback | (text: string) => void | No | Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
**Example**
**Example**
```js
```js
letonInsertTextCallback=(text:string)=>{
console.log(`Succeeded in subscribing insertText: ${text}`);
| type | string | Yes | Listening type.<br>The value **'deleteLeft'** indicates the backward delete event.|
| type | string | Yes | Listening type.<br>The value **'deleteLeft'** indicates the backward delete event.|
| callback | (length: number) => void | No | Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
**Example**
**Example**
```js
```js
letonDeleteLeftCallback=(length:number)=>{
console.log(`Succeeded in subscribing deleteLeft, length: ${length}`);
| type | string | Yes | Listening type.<br>The value **'deleteRight'** indicates the forward delete event.|
| type | string | Yes | Listening type.<br>The value **'deleteRight'** indicates the forward delete event.|
| callback | (length: number) => void | No | Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
**Example**
**Example**
```js
```js
letonDeleteRightCallback=(length:number)=>{
console.log(`Succeeded in subscribing deleteRight, length: ${length}`);
Enables listening for the keyboard status event of the input method. This API uses an asynchronous callback to return the result.
Enables listening for the keyboard status event of the input method. This API uses an asynchronous callback to return the result.
...
@@ -1824,7 +1842,7 @@ Enables listening for the keyboard status event of the input method. This API us
...
@@ -1824,7 +1842,7 @@ Enables listening for the keyboard status event of the input method. This API us
| Name | Type | Mandatory| Description |
| Name | Type | Mandatory| Description |
| -------- | ------ | ---- | ---- |
| -------- | ------ | ---- | ---- |
| type | string | Yes | Listening type.<br>The value **'sendKeyboardStatus'** indicates the keyboard status event.|
| type | string | Yes | Listening type.<br>The value **'sendKeyboardStatus'** indicates the keyboard status event.|
| callback | (keyBoardStatus: [KeyboardStatus](#keyboardstatus10)) => void | Yes | Callback used to return the keyboard status.<br>Your application needs to perform operations based on the keyboard state returned in the callback.|
| callback | (keyboardStatus: [KeyboardStatus](#keyboardstatus10)) => void | Yes | Callback used to return the keyboard status.<br>Your application needs to perform operations based on the keyboard state returned in the callback.|
**Error codes**
**Error codes**
...
@@ -1838,8 +1856,8 @@ For details about the error codes, see [Input Method Framework Error Codes](../e
...
@@ -1838,8 +1856,8 @@ For details about the error codes, see [Input Method Framework Error Codes](../e
| type | string | Yes | Listening type.<br>The value **'sendKeyboardStatus'** indicates the keyboard status event.|
| type | string | Yes | Listening type.<br>The value **'sendKeyboardStatus'** indicates the keyboard status event.|
| callback | (keyboardStatus: [KeyboardStatus](#keyboardstatus10)) => void | No | Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
| type | string | Yes | Listening type.<br>The value **'sendFunctionKey'** indicates the function key sending event.|
| type | string | Yes | Listening type.<br>The value **'sendFunctionKey'** indicates the function key sending event.|
| callback | (functionKey: [FunctionKey](#functionkey10)) => void | No | Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
**Example**
**Example**
```js
```js
letonSendFunctionKey=(functionKey:FunctionKey)=>{
console.log(`Succeeded in subscribing sendFunctionKey, functionKey: ${functionKey.enterKeyType}`);
Disables listening for the cursor movement event of the input method.
Disables listening for the cursor movement event of the input method.
...
@@ -1969,10 +1997,15 @@ Disables listening for the cursor movement event of the input method.
...
@@ -1969,10 +1997,15 @@ Disables listening for the cursor movement event of the input method.
| Name | Type | Mandatory| Description |
| Name | Type | Mandatory| Description |
| ------ | ------ | ---- | ---- |
| ------ | ------ | ---- | ---- |
| type | string | Yes | Listening type.<br>The value **'moveCursor'** indicates the cursor movement event.|
| type | string | Yes | Listening type.<br>The value **'moveCursor'** indicates the cursor movement event.|
| callback | (direction: [Direction<sup>10+</sup>](#direction10)) => void | No| Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
**Example**
**Example**
```js
```js
letonMoveCursorCallback=(direction:Direction)=>{
console.log(`Succeeded in subscribing moveCursor, direction: ${direction}`);
Disables listening for the extended action handling event of the input method.
Disables listening for the extended action handling event of the input method.
...
@@ -2024,10 +2057,15 @@ Disables listening for the extended action handling event of the input method.
...
@@ -2024,10 +2057,15 @@ Disables listening for the extended action handling event of the input method.
| Name| Type | Mandatory| Description |
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ------- |
| ------ | ------ | ---- | ------- |
| type | string | Yes | Listening type.<br>The value **'handleExtendAction'** indicates the extended action handling event.|
| type | string | Yes | Listening type.<br>The value **'handleExtendAction'** indicates the extended action handling event.|
| callback | (action: [ExtendAction](#extendaction10)) => void | No| Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
| type | string | Yes | Listening type.<br>The value **'selectByRange'** indicates the select-by-range event.|
| type | string | Yes | Listening type.<br>The value **'selectByRange'** indicates the select-by-range event.|
| callback | Callback<[Range](#range10)> | No | Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
**Example**
**Example**
```js
```js
letonSelectByRangeCallback=(range:Range)=>{
console.log(`Succeeded in subscribing selectByRange, range: ${JSON.stringify(range)}`);
| type | string | Yes | Listening type.<br>The value **'selectByMovement'** indicates the select-by-cursor-movement event.|
| type | string | Yes | Listening type.<br>The value **'selectByMovement'** indicates the select-by-cursor-movement event.|
| callback | Callback<[Movement](#movement10)> | No | Callback used for disable listening, which must be the same as that passed by the **on** API. If this parameter is not specified, all callbacks corresponding to the set event are invoked.|
@@ -2132,6 +2180,14 @@ Enables listening for the event of obtaining the length of text deleted backward
...
@@ -2132,6 +2180,14 @@ Enables listening for the event of obtaining the length of text deleted backward
| type | string | Yes | Listening type.<br>The value **'getLeftTextOfCursor'** indicates the event of obtaining the length of text deleted backward.|
| type | string | Yes | Listening type.<br>The value **'getLeftTextOfCursor'** indicates the event of obtaining the length of text deleted backward.|
| callback | (length: number) => string | Yes | Callback used to obtain the text of the specified length deleted backward.<br>In this callback, obtain the text of the specified length on the left of the cursor in the latest state of the edit box and return the text.|
| callback | (length: number) => string | Yes | Callback used to obtain the text of the specified length deleted backward.<br>In this callback, obtain the text of the specified length on the left of the cursor in the latest state of the edit box and return the text.|
**Error codes**
For details about the error codes, see [Input Method Framework Error Codes](../errorcodes/errorcode-inputmethod-framework.md).
@@ -2190,6 +2246,14 @@ Enables listening for the event of obtaining the length of text deleted forward.
...
@@ -2190,6 +2246,14 @@ Enables listening for the event of obtaining the length of text deleted forward.
| type | string | Yes | Listening type.<br>The value **'getRightTextOfCursor'** indicates the event of obtaining the length of text deleted forward.|
| type | string | Yes | Listening type.<br>The value **'getRightTextOfCursor'** indicates the event of obtaining the length of text deleted forward.|
| callback | (length: number) => string | Yes | Callback used to obtain the text of the specified length deleted forward.<br>In this callback, obtain the text of the specified length on the right of the cursor in the latest state of the edit box and return the text.|
| callback | (length: number) => string | Yes | Callback used to obtain the text of the specified length deleted forward.<br>In this callback, obtain the text of the specified length on the right of the cursor in the latest state of the edit box and return the text.|
**Error codes**
For details about the error codes, see [Input Method Framework Error Codes](../errorcodes/errorcode-inputmethod-framework.md).
@@ -2248,6 +2312,14 @@ Enables listening for the event of obtaining the index of text at the cursor. Th
...
@@ -2248,6 +2312,14 @@ Enables listening for the event of obtaining the index of text at the cursor. Th
| type | string | Yes | Listening type.<br>The value **'getTextIndexAtCursor'** indicates the event of obtaining the index of text at the cursor.|
| type | string | Yes | Listening type.<br>The value **'getTextIndexAtCursor'** indicates the event of obtaining the index of text at the cursor.|
| callback | () => number | Yes | Callback used to obtain the index of text at the cursor.<br>In this callback, obtain the index of text at the cursor in the latest state of the edit box and return the index.|
| callback | () => number | Yes | Callback used to obtain the index of text at the cursor.<br>In this callback, obtain the index of text at the cursor in the latest state of the edit box and return the index.|
**Error codes**
For details about the error codes, see [Input Method Framework Error Codes](../errorcodes/errorcode-inputmethod-framework.md).
| type | string | Yes | Listening type.<br>The value **'editorAttributeChanged'** indicates the edit box attribute change event.|
| callback | (attr: EditorAttribute) => void | No | Callback for the edit box attribute change event. It must correspond to the one in the **on** API.|
In the following API examples, you must first use **[createPanel](#createpanel10)** to obtain a **Panel** instance, and then call the APIs using the obtained instance.
In the following API examples, you must first use **[createPanel](#createpanel10)** to obtain a **Panel** instance, and then call the APIs using the obtained instance.
Obtains the certificate information of the current website. When the \<Web> component is used to load an HTTPS website, SSL certificate verification is performed. This API uses a promise to return the [X.509 certificate](./js-apis-cert.md) of the current website.
Obtains the certificate information of this website. When the **\<Web>** component is used to load an HTTPS website, SSL certificate verification is performed. This API uses a promise to return the [X.509 certificate](./js-apis-cert.md) of the current website.
Obtains the certificate information of the current website. When the \<Web> component is used to load an HTTPS website, SSL certificate verification is performed. This API uses an asynchronous callback to return the [X.509 certificate](./js-apis-cert.md) of the current website.
Obtains the certificate information of this website. When the **\<Web>** component is used to load an HTTPS website, SSL certificate verification is performed. This API uses an asynchronous callback to return the [X.509 certificate](./js-apis-cert.md) of the website.
Prefetches resources in the background for a page that is likely to be accessed in the near future, without executing the page JavaScript code or presenting the page. This can significantly reduce the load time for the prefetched page.
Preconnects to a URL. This API can be called before the URL is loaded, to resolve the DNS and establish a socket connection, without obtaining the resources.
| preconnectable | boolean | Yes | Whether to perform preconnection, which involves DNS resolution and socket connection establishment. The value **true** means to perform preconnection, and **false** means the opposite.|
| numSockets | number | Yes | Number of sockets to be preconnected. The value must be greater than 0. A maximum of six socket connections are allowed.|
**Error codes**
For details about the error codes, see [Webview Error Codes](../errorcodes/errorcode-webview.md).
Implements a **WebCookieManager** instance to manage behavior of cookies in **\<Web>** components. All **\<Web>** components in an application share a **WebCookieManager** instance.
Implements a **WebCookieManager** instance to manage behavior of cookies in **\<Web>** components. All **\<Web>** components in an application share a **WebCookieManager** instance.
> **NOTE**
>
> You must load the **\<Web>** component before calling APIs in **WebCookieManager**.
### getCookie
### getCookie
static getCookie(url: string): string
static getCookie(url: string): string
...
@@ -4347,7 +4449,6 @@ Saves the cookies in the memory to the drive. This API uses an asynchronous call
...
@@ -4347,7 +4449,6 @@ Saves the cookies in the memory to the drive. This API uses an asynchronous call
| callback | AsyncCallback\<void> | Yes | Callback used to return whether the cookies are successfully saved.|
| callback | AsyncCallback\<void> | Yes | Callback used to return whether the cookies are successfully saved.|
**Example**
**Example**
```ts
```ts
...
@@ -4688,6 +4789,10 @@ struct WebComponent {
...
@@ -4688,6 +4789,10 @@ struct WebComponent {
Implements a **WebStorage** object to manage the Web SQL database and HTML5 Web Storage APIs. All **\<Web>** components in an application share a **WebStorage** object.
Implements a **WebStorage** object to manage the Web SQL database and HTML5 Web Storage APIs. All **\<Web>** components in an application share a **WebStorage** object.
> **NOTE**
>
> You must load the **\<Web>** component before calling the APIs in **WebStorage**.
### deleteOrigin
### deleteOrigin
static deleteOrigin(origin : string): void
static deleteOrigin(origin : string): void
...
@@ -5148,6 +5253,10 @@ struct WebComponent {
...
@@ -5148,6 +5253,10 @@ struct WebComponent {
Implements a **WebDataBase** object.
Implements a **WebDataBase** object.
> **NOTE**
>
> You must load the **\<Web>** component before calling the APIs in **WebDataBase**.
> You must load the **\<Web>** component before calling the APIs in **GeolocationPermissions**.
### Required Permissions
### Required Permissions
**ohos.permission.LOCATION**, **ohos.permission.APPROXIMATELY_LOCATION**, and **ohos.permission.LOCATION_IN_BACKGROUND**, which are required for accessing the location information. For details about the permissions, see [@ohos.geolocation (Geolocation)](./js-apis-geolocation.md).
**ohos.permission.LOCATION**, **ohos.permission.APPROXIMATELY_LOCATION**, and **ohos.permission.LOCATION_IN_BACKGROUND**, which are required for accessing the location information. For details about the permissions, see [@ohos.geolocation (Geolocation)](./js-apis-geolocation.md).
...
@@ -5739,7 +5852,6 @@ Describes the type of the returned result of script execution using [runJavaScir
...
@@ -5739,7 +5852,6 @@ Describes the type of the returned result of script execution using [runJavaScir
| ARRAY_BUFFER | 4 |Raw binary data buffer.|
| ARRAY_BUFFER | 4 |Raw binary data buffer.|
| ARRAY | 5 |Array type.|
| ARRAY | 5 |Array type.|
## WebMessageType<sup>10+</sup>
## WebMessageType<sup>10+</sup>
Describes the data type supported by the [webMessagePort](#webmessageport) API.
Describes the data type supported by the [webMessagePort](#webmessageport) API.
...
@@ -5796,7 +5908,6 @@ For details about the error codes, see [Webview Error Codes](../errorcodes/error
...
@@ -5796,7 +5908,6 @@ For details about the error codes, see [Webview Error Codes](../errorcodes/error
The following uses **filesDir** as an example to describe how to obtain the path of the sandbox. For details about how to obtain other paths, see [Obtaining Application File Paths](../../application-models/application-context-stage.md#obtaining-application-file-paths).
The following uses **filesDir** as an example to describe how to obtain the path of the sandbox. For details about how to obtain other paths, see [Obtaining Application File Paths](../../application-models/application-context-stage.md#obtaining-application-file-paths).
```ts
```ts
// xxx.ts
// xxx.ts
...
@@ -672,12 +671,16 @@ Sets whether to display the vertical scrollbar, including the default system scr
...
@@ -672,12 +671,16 @@ Sets whether to display the vertical scrollbar, including the default system scr
</html>
</html>
```
```
### password
### password<sup>(deprecated)</sup>
password(password: boolean)
password(password: boolean)
Sets whether the password should be saved. This API is a void API.
Sets whether the password should be saved. This API is a void API.
> **NOTE**
>
> This API is deprecated since API version 10, and no new API is provided as a substitute.
### cacheMode
### cacheMode
cacheMode(cacheMode: CacheMode)
cacheMode(cacheMode: CacheMode)
...
@@ -993,7 +996,6 @@ Sets the minimum logical font size for the web page.
...
@@ -993,7 +996,6 @@ Sets the minimum logical font size for the web page.
}
}
```
```
### webFixedFont<sup>9+</sup>
### webFixedFont<sup>9+</sup>
webFixedFont(family: string)
webFixedFont(family: string)
...
@@ -1244,18 +1246,26 @@ Sets whether to enable forcible dark mode for the web page. By default, this fea
...
@@ -1244,18 +1246,26 @@ Sets whether to enable forcible dark mode for the web page. By default, this fea
}
}
```
```
### tableData
### tableData<sup>(deprecated)</sup>
tableData(tableData: boolean)
tableData(tableData: boolean)
Sets whether form data should be saved. This API is a void API.
Sets whether form data should be saved. This API is a void API.
### wideViewModeAccess
> **NOTE**
>
> This API is deprecated since API version 10, and no new API is provided as a substitute.
### wideViewModeAccess<sup>(deprecated)</sup>
wideViewModeAccess(wideViewModeAccess: boolean)
wideViewModeAccess(wideViewModeAccess: boolean)
Sets whether to support the viewport attribute of the HTML **\<meta>** tag. This API is a void API.
Sets whether to support the viewport attribute of the HTML **\<meta>** tag. This API is a void API.
> **NOTE**
>
> This API is deprecated since API version 10, and no new API is provided as a substitute.
### pinchSmooth<sup>9+</sup>
### pinchSmooth<sup>9+</sup>
pinchSmooth(isEnabled: boolean)
pinchSmooth(isEnabled: boolean)
...
@@ -1386,7 +1396,6 @@ Sets the web-based media playback policy, including the validity period for auto
...
@@ -1386,7 +1396,6 @@ Sets the web-based media playback policy, including the validity period for auto
**Example**
**Example**
```ts
```ts
// xxx.ets
// xxx.ets
importweb_webviewfrom'@ohos.web.webview'
importweb_webviewfrom'@ohos.web.webview'
...
@@ -1941,7 +1950,6 @@ Called when an HTTP error (the response code is greater than or equal to 400) oc
...
@@ -1941,7 +1950,6 @@ Called when an HTTP error (the response code is greater than or equal to 400) oc
Called when the controller is successfully bound to the **\<Web>** component. The controller must be WebviewController.
As the web page is not yet loaded when this callback is called, APIs for operating the web page cannot be used in the callback, for example, [zoomIn](../apis/js-apis-webview.md#zoomin) and [zoomOut]. (../apis/js-apis-webview.md#zoomout). Other APIs, such as [loadUrl] (../apis/js-apis-webview.md#loadurl) and [getWebId] (../apis/js-apis-webview.md#getwebid), which do not involve web page operations, can be used properly.
**Example**
The following example uses **loadUrl** in the callback to load the web page.
Implements the **ConsoleMessage** object. For the sample code, see [onConsole](#onconsole).
Implements the **ConsoleMessage** object. For the sample code, see [onConsole](#onconsole).
...
@@ -3470,7 +3626,7 @@ Obtains the path and name of the web page source file.
...
@@ -3470,7 +3626,7 @@ Obtains the path and name of the web page source file.
## JsResult
## JsResult
Implements the **JsResult** object, which indicates the result returned to the **\<Web>** component to indicate the user operation performed in the dialog box. For the sample code, see [onAlert](#onalert).
Implements the **JsResult** object, which indicates the result returned to the **\<Web>** component to indicate the user operation performed in the dialog box. For the sample code, see [onAlert Event](#onalert).
### handleCancel
### handleCancel
...
@@ -3635,7 +3791,6 @@ Describes the request/response header returned by the **\<Web>** component.
...
@@ -3635,7 +3791,6 @@ Describes the request/response header returned by the **\<Web>** component.
| headerKey | string | Key of the request/response header. |
| headerKey | string | Key of the request/response header. |
| headerValue | string | Value of the request/response header.|
| headerValue | string | Value of the request/response header.|
## WebResourceResponse
## WebResourceResponse
Implements the **WebResourceResponse** object. For the sample code, see [onHttpErrorReceive](#onhttperrorreceive).
Implements the **WebResourceResponse** object. For the sample code, see [onHttpErrorReceive](#onhttperrorreceive).
...
@@ -4010,6 +4165,42 @@ Grants the permission for resources requested by the web page.
...
@@ -4010,6 +4165,42 @@ Grants the permission for resources requested by the web page.
| resources | Array\<string\> | Yes | - | List of resources that can be requested by the web page with the permission to grant.|
| resources | Array\<string\> | Yes | - | List of resources that can be requested by the web page with the permission to grant.|
## ScreenCaptureHandler<sup>10+</sup>
Implements the **ScreenCaptureHandler** object for accepting or rejecting a screen capture request. For the sample code, see [onScreenCaptureRequest Event](#onscreencapturerequest10).
### deny<sup>10+</sup>
deny(): void
Rejects this screen capture request.
### getOrigin<sup>10+</sup>
getOrigin(): string
Obtains the origin of this web page.
**Return value**
| Type | Description |
| ------ | ------------ |
| string | Origin of the web page that requests the permission.|
| MidiSysex | MIDI SYSEX resource.| Currently, only permission events can be reported. MIDI devices are not yet supported.|
| MidiSysex | MIDI SYSEX resource.| Currently, only permission events can be reported. MIDI devices are not yet supported.|
| VIDEO_CAPTURE<sup>10+</sup> | Video capture resource, such as a camera.| |
| VIDEO_CAPTURE<sup>10+</sup> | Video capture resource, such as a camera.| |
| AUDIO_CAPTURE<sup>10+</sup> | Audio capture resource, such as a microphone.| |
## WebDarkMode<sup>9+</sup>
## WebDarkMode<sup>9+</sup>
| Name | Description |
| Name | Description |
...
@@ -4335,6 +4527,12 @@ Enumerates the error codes returned by **onSslErrorEventReceive** API.
...
@@ -4335,6 +4527,12 @@ Enumerates the error codes returned by **onSslErrorEventReceive** API.
| On | The web dark mode is enabled. |
| On | The web dark mode is enabled. |
| Auto | The web dark mode setting follows the system settings. |
| Auto | The web dark mode setting follows the system settings. |
## WebCaptureMode<sup>10+</sup>
| Name | Description |
| --------- | ------------- |
| HOME_SCREEN | Capture of the home screen.|
## WebMediaOptions<sup>10+</sup>
## WebMediaOptions<sup>10+</sup>
Describes the web-based media playback policy.
Describes the web-based media playback policy.
...
@@ -4344,6 +4542,14 @@ Describes the web-based media playback policy.
...
@@ -4344,6 +4542,14 @@ Describes the web-based media playback policy.
| resumeInterval | number | Yes | Yes | No |Validity period for automatically resuming a paused web audio, in seconds. The maximum validity period is 60 seconds. Due to the approximate value, the validity period may have a deviation of less than 1 second.|
| resumeInterval | number | Yes | Yes | No |Validity period for automatically resuming a paused web audio, in seconds. The maximum validity period is 60 seconds. Due to the approximate value, the validity period may have a deviation of less than 1 second.|
| audioExclusive | boolean | Yes | Yes | No | Whether the audio of multiple **\<Web>** instances in an application is exclusive. |
| audioExclusive | boolean | Yes | Yes | No | Whether the audio of multiple **\<Web>** instances in an application is exclusive. |
## ScreenCaptureConfig<sup>10+</sup>
Provides the web screen capture configuration.
| Name | Type | Readable| Writable| Mandatory| Description |
Implements the **DataResubmissionHandler** object for resubmitting or canceling the web form data.
Implements the **DataResubmissionHandler** object for resubmitting or canceling the web form data.
...
@@ -4653,7 +4859,7 @@ This API is deprecated since API version 9. You are advised to use [forward<sup>
...
@@ -4653,7 +4859,7 @@ This API is deprecated since API version 9. You are advised to use [forward<sup>
deleteJavaScriptRegister(name: string)
deleteJavaScriptRegister(name: string)
Deletes a specific application JavaScript object that is registered with the window through **registerJavaScriptProxy**. The deletion takes effect immediately, with no need for invoking the[refresh](#refreshdeprecated) API.
Deletes a specific application JavaScript object that is registered with the window through **registerJavaScriptProxy**. The deletion takes effect immediately, with no need for invoking the[refresh](#refreshdeprecated) API.
This API is deprecated since API version 9. You are advised to use [deleteJavaScriptRegister<sup>9+</sup>](../apis/js-apis-webview.md#deletejavascriptregister) instead.
This API is deprecated since API version 9. You are advised to use [deleteJavaScriptRegister<sup>9+</sup>](../apis/js-apis-webview.md#deletejavascriptregister) instead.
| [fillStyle](#fillstyle) | string \|number<sup>10+</sup>\|[CanvasGradient](ts-components-canvas-canvasgradient.md)\|[CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Style to fill an area.<br>- When the type is string, this attribute indicates the color of the fill area.<br>- When the type is number, this attribute indicates the color of the fill area.<br>- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.<br>- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.<br>Since API version 9, this API is supported in ArkTS widgets.|
| [fillStyle](#fillstyle) | string \|number<sup>10+</sup>\|[CanvasGradient](ts-components-canvas-canvasgradient.md)\|[CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Style to fill an area.<br>- When the type is string, this attribute indicates the color of the fill area.<br>Default value: **'black'**<br>- When the type is number, this attribute indicates the color of the fill area.<br>Default value: **'#000000'**<br>- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.<br>- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.<br>Since API version 9, this API is supported in ArkTS widgets.|
| [lineWidth](#linewidth) | number | Line width. |
| [lineWidth](#linewidth) | number | Line width.<br>Default value: **1(px)** |
| [strokeStyle](#strokestyle) | string \|number<sup>10+</sup>\|[CanvasGradient](ts-components-canvas-canvasgradient.md)\|[CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Stroke style.<br>- When the type is string, this attribute indicates the stroke color.<br>- When the type is number, this attribute indicates the stroke color.<br>- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.<br>- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.<br>Since API version 9, this API is supported in ArkTS widgets.|
| [strokeStyle](#strokestyle) | string \|number<sup>10+</sup>\|[CanvasGradient](ts-components-canvas-canvasgradient.md)\|[CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Stroke style.<br>- When the type is string, this attribute indicates the stroke color.<br>Default value: **'black'**<br>- When the type is number, this attribute indicates the stroke color.<br>Default value: **'#000000'**<br>- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.<br>- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.<br>Since API version 9, this API is supported in ArkTS widgets.|
| [lineCap](#linecap) | CanvasLineCap | Style of the line endpoints. The options are as follows:<br>- **'butt'**: The endpoints of the line are squared off.<br>- **'round'**: The endpoints of the line are rounded.<br>- **'square'**: The endpoints of the line are squared off by adding a box with an equal width and half the height of the line's thickness.<br>Default value: **'butt'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [lineCap](#linecap) | CanvasLineCap | Style of the line endpoints. The options are as follows:<br>- **'butt'**: The endpoints of the line are squared off.<br>- **'round'**: The endpoints of the line are rounded.<br>- **'square'**: The endpoints of the line are squared off by adding a box with an equal width and half the height of the line's thickness.<br>Default value: **'butt'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [lineJoin](#linejoin) | CanvasLineJoin | Style of the shape used to join line segments. The options are as follows:<br>- **'round'**: The shape used to join line segments is a sector, whose radius at the rounded corner is equal to the line width.<br>- **'bevel'**: The shape used to join line segments is a triangle. The rectangular corner of each line is independent.<br>- **'miter'**: The shape used to join line segments has a mitered corner by extending the outside edges of the lines until they meet. You can view the effect of this attribute in **miterLimit**.<br>Default value: **'miter'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [lineJoin](#linejoin) | CanvasLineJoin | Style of the shape used to join line segments. The options are as follows:<br>- **'round'**: The shape used to join line segments is a sector, whose radius at the rounded corner is equal to the line width.<br>- **'bevel'**: The shape used to join line segments is a triangle. The rectangular corner of each line is independent.<br>- **'miter'**: The shape used to join line segments has a mitered corner by extending the outside edges of the lines until they meet. You can view the effect of this attribute in **miterLimit**.<br>Default value: **'miter'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [miterLimit](#miterlimit) | number | Maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet.<br>Default value: **10**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [miterLimit](#miterlimit) | number | Maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet.<br>Default value: **10**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [font](#font) | string | Font style.<br>Syntax: ctx.font='font-size font-family'<br>- (Optional) **font-size**: font size and row height. The unit can only be pixels.<br>- (Optional) **font-family**: font family.<br>Syntax: ctx.font='font-style font-weight font-size font-family'<br>- (Optional) **font-style**: font style. Available values are **'normal'** and **'italic'**.<br>- (Optional) **font-weight**: font weight. Available values are as follows: **'normal'**, **'bold'**, **'bolder'**, **'lighter'**, **'100'**, **'200'**, **'300'**, **'400'**, **'500'**, **'600'**, **'700'**, **'800'**, **'900'**.<br>- (Optional) **font-size**: font size and row height. The unit must be specified and can only be px or vp.<br>- (Optional) **font-family**: font family. Available values are **'sans-serif'**, **'serif'**, and **'monospace'**.<br>Default value: **'normal normal 14px sans-serif'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [font](#font) | string | Font style.<br>Syntax: ctx.font='font-size font-family'<br>- (Optional) **font-size**: font size and row height. The unit can only be px.<br>- (Optional) **font-family**: font family.<br>Syntax: ctx.font='font-style font-weight font-size font-family'<br>- (Optional) **font-style**: font style. Available values are **'normal'** and **'italic'**.<br>- (Optional) **font-weight**: font weight. Available values are as follows: **'normal'**, **'bold'**, **'bolder'**, **'lighter'**, **'100'**, **'200'**, **'300'**, **'400'**, **'500'**, **'600'**, **'700'**, **'800'**, **'900'**.<br>- (Optional) **font-size**: font size and row height. The unit must be specified and can only be px or vp.<br>- (Optional) **font-family**: font family. Available values are **'sans-serif'**, **'serif'**, and **'monospace'**.<br>Default value: **'normal normal 14px sans-serif'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [textAlign](#textalign) | CanvasTextAlign | Text alignment mode. Available values are as follows:<br>- **'left'**: The text is left-aligned.<br>- **'right'**: The text is right-aligned.<br>- **'center'**: The text is center-aligned.<br>- **'start'**: The text is aligned with the start bound.<br>- **'end'**: The text is aligned with the end bound.<br>In the **ltr** layout mode, the value **'start'** equals **'left'**. In the **rtl** layout mode, the value **'start'** equals **'right'**.<br>Default value: **'left'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [textAlign](#textalign) | CanvasTextAlign | Text alignment mode. Available values are as follows:<br>- **'left'**: The text is left-aligned.<br>- **'right'**: The text is right-aligned.<br>- **'center'**: The text is center-aligned.<br>- **'start'**: The text is aligned with the start bound.<br>- **'end'**: The text is aligned with the end bound.<br>In the **ltr** layout mode, the value **'start'** equals **'left'**. In the **rtl** layout mode, the value **'start'** equals **'right'**.<br>Default value: **'left'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [textBaseline](#textbaseline) | CanvasTextBaseline | Horizontal alignment mode of text. Available values are as follows:<br>- **'alphabetic'**: The text baseline is the normal alphabetic baseline.<br>- **'top'**: The text baseline is on the top of the text bounding box.<br>- **'hanging'**: The text baseline is a hanging baseline over the text.<br>- **'middle'**: The text baseline is in the middle of the text bounding box.<br>**'ideographic'**: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline, the ideographic baseline is located at the bottom of the excess character.<br>- **'bottom'**: The text baseline is at the bottom of the text bounding box. Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line.<br>Default value: **'alphabetic'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [textBaseline](#textbaseline) | CanvasTextBaseline | Horizontal alignment mode of text. Available values are as follows:<br>- **'alphabetic'**: The text baseline is the normal alphabetic baseline.<br>- **'top'**: The text baseline is on the top of the text bounding box.<br>- **'hanging'**: The text baseline is a hanging baseline over the text.<br>- **'middle'**: The text baseline is in the middle of the text bounding box.<br>**'ideographic'**: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline, the ideographic baseline is located at the bottom of the excess character.<br>- **'bottom'**: The text baseline is at the bottom of the text bounding box. Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line.<br>Default value: **'alphabetic'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [globalAlpha](#globalalpha) | number | Opacity.<br>**0.0**: completely transparent.<br>**1.0**: completely opaque.<br>Since API version 9, this API is supported in ArkTS widgets.|
| [globalAlpha](#globalalpha) | number | Opacity.<br>**0.0**: completely transparent.<br>**1.0**: completely opaque.<br>Since API version 9, this API is supported in ArkTS widgets.|
...
@@ -59,8 +59,8 @@ Since API version 9, this API is supported in ArkTS widgets.
...
@@ -59,8 +59,8 @@ Since API version 9, this API is supported in ArkTS widgets.
| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | Whether to adjust the image smoothness during image drawing. The value **true** means to enable this feature, and **false** means the opposite.<br>Default value: **true**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | Whether to adjust the image smoothness during image drawing. The value **true** means to enable this feature, and **false** means the opposite.<br>Default value: **true**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [height](#height) | number | Component height.<br>Unit: vp<br>Since API version 9, this API is supported in ArkTS widgets.|
| [height](#height) | number | Component height.<br>Unit: vp<br>Since API version 9, this API is supported in ArkTS widgets.|
| [width](#width) | number | Component width.<br>Unit: vp<br>Since API version 9, this API is supported in ArkTS widgets.|
| [width](#width) | number | Component width.<br>Unit: vp<br>Since API version 9, this API is supported in ArkTS widgets.|
| [imageSmoothingQuality](#imagesmoothingquality)| ImageSmoothingQuality | Quality of image smoothing. This attribute works only when **imageSmoothingEnabled** is set to **true**. Available values are as follows:<br>- **'low'**: low quality.<br>- **'medium'**: medium quality.<br>- **'high'**: high quality.<br>Default value: **'low'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [imageSmoothingQuality](#imagesmoothingquality) |[ImageSmoothingQuality](ts-appendix-enums.md#imagesmoothingquality8) | Quality of image smoothing. This attribute works only when **imageSmoothingEnabled** is set to **true**.<br>Default value: **ImageSmoothingQuality.low**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [direction](#direction) | CanvasDirection | Text direction used for drawing text. Available values are as follows:<br>- **'inherit'**: The text direction is inherited from the **\<Canvas>** component.<br>- **'ltr'**: The text direction is from left to right.<br>- **'rtl'**: The text direction is from right to left.<br>Default value: **'inherit'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [direction](#direction)| [CanvasDirection](ts-appendix-enums.md#canvasdirection8) | Text direction used for drawing text.<br>Default value: **CanvasDirection.inherit**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [filter](#filter) | string | Filter effect. Available values are as follows:<br>- **'none'**: no filter effect.<br>- **'blur'**: applies the Gaussian blur for the image.<br>- **'brightness'**: applies a linear multiplication to the image to make it look brighter or darker.<br>- **'contrast'**: adjusts the image contrast.<br>- **'grayscale'**: converts the image to a grayscale image.<br>- **'hue-rotate'**: applies hue rotation to the image.<br>- **'invert'**: inverts the input image.<br>- **'opacity'**: sets the opacity of the image.<br>- **'saturate'**: sets the saturation of the image.<br>- **'sepia'**: converts the image to dark brown.<br>Default value: **'none'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| [filter](#filter) | string | Filter effect. Available values are as follows:<br>- **'none'**: no filter effect.<br>- **'blur'**: applies the Gaussian blur for the image.<br>- **'brightness'**: applies a linear multiplication to the image to make it look brighter or darker.<br>- **'contrast'**: adjusts the image contrast.<br>- **'grayscale'**: converts the image to a grayscale image.<br>- **'hue-rotate'**: applies hue rotation to the image.<br>- **'invert'**: inverts the input image.<br>- **'opacity'**: sets the opacity of the image.<br>- **'saturate'**: sets the saturation of the image.<br>- **'sepia'**: converts the image to dark brown.<br>Default value: **'none'**<br>Since API version 9, this API is supported in ArkTS widgets.|
| filter | string | Yes | - | Filter functions. Available values are as follows:<br>- **'none'**: no filter effect.<br>- **'blur'**: applies the Gaussian blur for the image.<br>- **'brightness'**: applies a linear multiplication to the image to make it look brighter or darker.<br>- **'contrast'**: adjusts the image contrast.<br>- **'grayscale'**: converts the image to a grayscale image.<br>- **'hue-rotate'**: applies hue rotation to the image.<br>- **'invert'**: inverts the input image.<br>- **'opacity'**: sets the opacity of the image.<br>- **'saturate'**: sets the saturation of the image.<br>- **'sepia'**: converts the image to dark brown.<br>Default value: **'none'**|
@@ -2152,7 +2150,7 @@ Since API version 9, this API is supported in ArkTS widgets.
...
@@ -2152,7 +2150,7 @@ Since API version 9, this API is supported in ArkTS widgets.
setTransform(transform?: Matrix2D): void
setTransform(transform?: Matrix2D): void
Resets the current transformation to the identity matrix, and then creates a new transformation matrix based on the specified **Matrix2D** object. This API is a void API.
Resets the current transformation to the identity matrix, and then creates a new transformation matrix based on the specified **Matrix2D** object.
Since API version 9, this API is supported in ArkTS widgets.
Since API version 9, this API is supported in ArkTS widgets.
...
@@ -2162,6 +2160,66 @@ Since API version 9, this API is supported in ArkTS widgets.
...
@@ -2162,6 +2160,66 @@ Since API version 9, this API is supported in ArkTS widgets.
| image | [ImageBitmap](ts-components-canvas-imagebitmap.md) or [PixelMap](../apis/js-apis-image.md#pixelmap7)| Yes | null | Image resource. For details, see **ImageBitmap** or PixelMap. |
| image | [ImageBitmap](ts-components-canvas-imagebitmap.md) or [PixelMap](../apis/js-apis-image.md#pixelmap7)| Yes | null | Image resource. For details, see **ImageBitmap** or PixelMap. |
| sx | number | No | 0 | X-coordinate of the upper left corner of the rectangle used to crop the source image. |
| sx | number | No | 0 | Xcoordinate of the upper left corner of the rectangle used to crop the source image. |
| sy | number | No | 0 | Y-coordinate of the upper left corner of the rectangle used to crop the source image. |
| sy | number | No | 0 | Ycoordinate of the upper left corner of the rectangle used to crop the source image. |
| sw | number | No | 0 | Target width to crop the source image. |
| sw | number | No | 0 | Target width to crop the source image. |
| sh | number | No | 0 | Target height to crop the source image. |
| sh | number | No | 0 | Target height to crop the source image. |
| dx | number | Yes | 0 | X-coordinate of the upper left corner of the drawing area on the canvas. |
| dx | number | Yes | 0 | Xcoordinate of the upper left corner of the drawing area on the canvas. |
| dy | number | Yes | 0 | Y-coordinate of the upper left corner of the drawing area on the canvas. |
| dy | number | Yes | 0 | Ycoordinate of the upper left corner of the drawing area on the canvas. |
| dw | number | No | 0 | Width of the drawing area. If the width of the drawing area is different from that of the cropped image, the latter will be stretched or compressed to the former.|
| dw | number | No | 0 | Width of the drawing area. If the width of the drawing area is different from that of the cropped image, the latter will be stretched or compressed to the former.|
| dh | number | No | 0 | Height of the drawing area. If the height of the drawing area is different from that of the cropped image, the latter will be stretched or compressed to the former.|
| dh | number | No | 0 | Height of the drawing area. If the height of the drawing area is different from that of the cropped image, the latter will be stretched or compressed to the former.|
...
@@ -2310,8 +2368,8 @@ Obtains the **[PixelMap](../apis/js-apis-image.md#pixelmap7)** object created wi
...
@@ -2310,8 +2368,8 @@ Obtains the **[PixelMap](../apis/js-apis-image.md#pixelmap7)** object created wi
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| ---- | ------ | ---- | ---- | --------------- |
| ---- | ------ | ---- | ---- | --------------- |
| sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area.|
| sx | number | Yes | 0 | Xcoordinate of the upper left corner of the output area.|
| sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area.|
| sy | number | Yes | 0 | Ycoordinate of the upper left corner of the output area.|
| sw | number | Yes | 0 | Width of the output area. |
| sw | number | Yes | 0 | Width of the output area. |
| sh | number | Yes | 0 | Height of the output area. |
| sh | number | Yes | 0 | Height of the output area. |
...
@@ -2333,8 +2391,8 @@ Since API version 9, this API is supported in ArkTS widgets.
...
@@ -2333,8 +2391,8 @@ Since API version 9, this API is supported in ArkTS widgets.
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| ---- | ------ | ---- | ---- | --------------- |
| ---- | ------ | ---- | ---- | --------------- |
| sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area.|
| sx | number | Yes | 0 | Xcoordinate of the upper left corner of the output area.|
| sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area.|
| sy | number | Yes | 0 | Ycoordinate of the upper left corner of the output area.|
| sw | number | Yes | 0 | Width of the output area. |
| sw | number | Yes | 0 | Width of the output area. |
| sh | number | Yes | 0 | Height of the output area. |
| sh | number | Yes | 0 | Height of the output area. |
...
@@ -2537,52 +2595,6 @@ Since API version 9, this API is supported in ArkTS widgets.
...
@@ -2537,52 +2595,6 @@ Since API version 9, this API is supported in ArkTS widgets.
| startAngle | number | Yes | 0 | Angle at which the gradient starts, in radians. The angle measurement starts horizontally from the right side of the center and moves clockwise.|
| startAngle | number | Yes | 0 | Angle at which the gradient starts, in radians. The angle measurement starts horizontally from the right side of the center and moves clockwise.|
| x | number | Yes | 0 | X-coordinate of the center of the conic gradient, in vp. |
| x | number | Yes | 0 | Xcoordinate of the center of the conic gradient, in vp. |
| y | number | Yes | 0 | X-coordinate of the center of the conic gradient, in vp. |
| y | number | Yes | 0 | Y coordinate of the center of the conic gradient, in vp. |
@@ -230,23 +230,23 @@ The related JS database API is not used.
...
@@ -230,23 +230,23 @@ The related JS database API is not used.
2. If the JS database API is used, find out the failure cause, for example, check whether **databaseAccess** is enabled.
2. If the JS database API is used, find out the failure cause, for example, check whether **databaseAccess** is enabled.
## 17100013 Memory Allocation Failure
## 17100013 Invalid Number of Sockets During Preconnection
**Error Message**
**Error Message**
New failed, out of memeory.
The number of preconnect sockets is invalid.
**Description**
**Description**
Memory allocation failed due to insufficient memory.
This error code is reported when the number of sockets to be preconnected is invalid.
**Possible Causes**
**Possible Causes**
The data to send is too large.
The number of sockets is less than or equal to 0 or greater than 6.
**Solution**
**Solution**
Check the length of the data to be sent.
Make sure the specified number of sockets is greater than 0 and less than or equal to 6.
## 17100014 Type and Value Mismatch
## 17100014 Type and Value Mismatch
...
@@ -257,7 +257,7 @@ The type does not match with the value of the message.
...
@@ -257,7 +257,7 @@ The type does not match with the value of the message.
**Description**
**Description**
The type and value of the message do not match.
This error code is reported when the type and value of the message do not match.
**Possible Causes**
**Possible Causes**
...
@@ -266,3 +266,22 @@ The value of the obtained message does not match the type of the message.
...
@@ -266,3 +266,22 @@ The value of the obtained message does not match the type of the message.
**Solution**
**Solution**
Call the API based on the message type to obtain the message value. For example, if the type is **BOOLEAN**, call the **GetBoolean** API to obtain the Boolean value.
Call the API based on the message type to obtain the message value. For example, if the type is **BOOLEAN**, call the **GetBoolean** API to obtain the Boolean value.
## 17100015 Memory Allocation Failure
**Error Message**
New failed, out of memeory.
**Description**
This error code is reported when memory allocation failed due to insufficient memory.
@@ -89,7 +89,7 @@ The following example registers the **test()** function with the frontend page.
...
@@ -89,7 +89,7 @@ The following example registers the **test()** function with the frontend page.
> **NOTE**
> **NOTE**
>
>
> If you use [registerJavaScriptProxy()](../reference/apis/js-apis-webview.md#registerjavascriptproxy) to register a function, call **[refresh()]**(../reference/apis/js-apis-webview.md#refresh) for the function to take effect.
> If you use [registerJavaScriptProxy()](../reference/apis/js-apis-webview.md#registerjavascriptproxy) to register a function, call [refresh()](../reference/apis/js-apis-webview.md#refresh) for the function to take effect.
- Sample code for invoking application functions on the **index.html** frontend page:
- Sample code for invoking application functions on the **index.html** frontend page:
...
@@ -103,7 +103,7 @@ The following example registers the **test()** function with the frontend page.
...
@@ -103,7 +103,7 @@ The following example registers the **test()** function with the frontend page.