@@ -26,4 +26,4 @@ If the compilation is successful, export the files in the **out/sdk/packages/oho
...
@@ -26,4 +26,4 @@ If the compilation is successful, export the files in the **out/sdk/packages/oho
## Replacing the SDK
## Replacing the SDK
After the full SDK is compiled, switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](../../application-dev/quick-start/full-sdk-switch-guide.md).
After the full SDK is compiled, switch to it in DevEco Studio. For details, see [Guide to Switching to Full SDK](full-sdk-switch-guide.md).
There are two methods for loading local resource files:
1. Using $rawfile
```ts
```ts
// xxx.ets
// xxx.ets
importweb_webviewfrom'@ohos.web.webview'
importweb_webviewfrom'@ohos.web.webview'
...
@@ -369,6 +371,8 @@ struct WebComponent {
...
@@ -369,6 +371,8 @@ struct WebComponent {
}
}
```
```
2. Using a sandbox path. For details, see the example of loading local resource files in the sandbox in [Web](../arkui-ts/ts-basic-components-web.md#web).
Example of loading local resource files in the sandbox:
Example of loading local resource files in the sandbox:
1. Use[globalthis](../../application-models/uiability-data-sync-with-ui.md#using-globalthis-between-uiability-and-page) to obtain the path of the sandbox.
1. Use[globalthis](../../application-models/uiability-data-sync-with-ui.md#using-globalthis-between-uiability-and-page) to obtain the path of the sandbox.
Sets whether to enable the multi-window permission.
Sets whether to enable the multi-window permission.
Enabling the multi-window permission requires implementation of the **onWindowNew** event. For details about the sample code, see [onWindowNew](#onwindownew9).
**Parameters**
**Parameters**
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
...
@@ -541,7 +543,7 @@ Sets whether to enable the multi-window permission.
...
@@ -541,7 +543,7 @@ Sets whether to enable the multi-window permission.
| controller | [WebviewController](../apis/js-apis-webview.md#webviewcontroller) | Yes | - | **WebviewController** object of the **\<Web>** component.|
| controller | [WebviewController](../apis/js-apis-webview.md#webviewcontroller) | Yes | - | **WebviewController** object of the **\<Web>** component. If opening a new window is not needed, set it to **null**.|
## WebResourceError
## WebResourceError
...
@@ -2997,6 +3032,18 @@ Checks whether the resource request is associated with a gesture (for example, a
...
@@ -2997,6 +3032,18 @@ Checks whether the resource request is associated with a gesture (for example, a
| ------- | -------------------- |
| ------- | -------------------- |
| boolean | Whether the resource request is associated with a gesture (for example, a tap).|
| boolean | Whether the resource request is associated with a gesture (for example, a tap).|
### getRequestMethod<sup>9+</sup>
getRequestMethod(): string
Obtains the request method.
**Return value**
| Type | Description |
| ------- | -------------------- |
| string | Request method.|
## Header
## Header
Describes the request/response header returned by the **\<Web>** component.
Describes the request/response header returned by the **\<Web>** component.
...
@@ -3191,7 +3238,7 @@ Implements the **FileSelectorParam** object. For the sample code, see [onShowFil
...
@@ -3191,7 +3238,7 @@ Implements the **FileSelectorParam** object. For the sample code, see [onShowFil