There are two methods for loading local resource files:
1. Using $rawfile
```ts
// xxx.ets
importweb_webviewfrom'@ohos.web.webview'
...
...
@@ -409,6 +411,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:
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.
Enabling the multi-window permission requires implementation of the **onWindowNew** event. For details about the sample code, see [onWindowNew](#onwindownew9).
**Parameters**
| Name | Type | Mandatory | Default Value | Description |
...
...
@@ -537,7 +539,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
...
...
@@ -3032,6 +3067,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).|
### getRequestMethod<sup>9+</sup>
getRequestMethod(): string
Obtains the request method.
**Return value**
| Type | Description |
| ------- | -------------------- |
| string | Request method.|
## Header
Describes the request/response header returned by the **\<Web>** component.