• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Web子系统JS API变更
2
3OpenHarmony 3.2 Beta2版本相较于OpenHarmony 3.2 Beta1版本,Web子系统的API变更如下:
4
5## 接口变更
6
7| 模块名 | 类名 | 函数 | 变更类型 |
8|---|---|---|---|
9| ohos.web | WebDataBase | static saveHttpAuthCredentials(host: string, realm: string, username: string, password: string): void; | 新增 |
10| ohos.web | WebDataBase | static getHttpAuthCredentials(host: string, realm: string): Array\<string>; | 新增 |
11| ohos.web | WebDataBase | static deleteHttpAuthCredentials(): void; | 新增 |
12| ohos.web | WebDataBase | static existHttpAuthCredentials(): boolean; | 新增 |
13| ohos.web | WebStorage | static getOriginUsage(origin: string): Promise\<number> ;<br>static getOriginUsage(origin: string, callback: AsyncCallback\<number>): void; | 新增 |
14| ohos.web | WebStorage | static getOriginQuota(origin: string): Promise\<number>;<br>static getOriginQuota(origin: string, callback: AsyncCallback\<number>): void; | 新增 |
15| ohos.web | WebStorage | static getOrigins(): Promise\<Array\<WebStorageOrigin>>;<br>static getOrigins(callback: AsyncCallback\<Array\<WebStorageOrigin>>): void; | 新增 |
16| ohos.web | WebStorage | static deleteOrigin(origin: string): void; | 新增 |
17| ohos.web | WebStorage | static deleteAllData(): void; | 新增 |
18| ohos.web | WebStorageOrigin | quota: number; | 新增 |
19| ohos.web | WebStorageOrigin | usage: number; | 新增 |
20| ohos.web | WebStorageOrigin | origin: string; | 新增 |
21| Web | WebAttribute | onInterceptRequest(callback: (event?: { request: WebResourceRequest}) => WebResourceResponse): WebAttribute; | 新增 |
22| Web | WebAttribute | onHttpAuthRequest(callback: (event?: { handler: HttpAuthHandler, host: string, realm: string }) => boolean): WebAttribute; | 新增 |
23| Web | WebAttribute | onScaleChange(callback: (event: {oldScale: number, newScale: number}) => void): WebAttribute; | 新增 |
24| Web | WebAttribute | onResourceLoad(callback: (event: {url: string}) => void): WebAttribute; | 新增 |
25| Web | WebAttribute | onPrompt(callback: (event?: {url: string, message: string, value: string, result: JsResult }) => boolean): WebAttribute; | 新增 |
26| Web | WebAttribute | initialScale(percent: number): WebAttribute; | 新增 |
27| Web | WebController | backOrForward(step: number): void; | 新增 |
28| Web | WebController | getPageHeight(): number; | 新增 |
29| Web | WebController | getTitle(): string; | 新增 |
30| Web | WebController | getDefaultUserAgent(): string; | 新增 |
31| Web | WebController | getWebId(): number; | 新增 |
32| Web | WebController | getHitTestValue(): HitTestValue; | 新增 |
33| Web | WebController | zoomOut(): boolean; | 新增 |
34| Web | WebController | zoomIn(): boolean; | 新增 |
35| Web | WebResourceResponse | setResponseCode(code: number); | 新增 |
36| Web | WebResourceResponse | setResponseHeader(header: Array\<Header>); | 新增 |
37| Web | WebResourceResponse | setReasonMessage(reason: string); | 新增 |
38| Web | WebResourceResponse | setResponseMimeType(mimeType: string); | 新增 |
39| Web | WebResourceResponse | setResponseEncoding(encoding: string); | 新增 |
40| Web | WebResourceResponse | setResponseData(data: string); | 新增 |