1e41f4b71Sopenharmony_ci# Web Subsystem Changelog
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciCompared with earlier versions, OpenHarmony 4.0.3.2 has the following API changes in its web subsystem:
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci## cl.web.1 HitTestTypeV9 Name Change
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciRenamed the enum class **HitTestTypeV9** **WebHitTestType** to meet the naming conventions.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci**Change Impact**
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ciThe enum class **HitTestTypeV9** and APIs that use **HitTestTypeV9** as a parameter or return value cannot be used in OpenHarmony 4.0.3.2 and later versions.
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci**Key API/Component Changes**
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci- Involved APIs:
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci  enum HitTestTypeV9
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci- Before change:
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci  ```ts
22e41f4b71Sopenharmony_ci  enum HitTestTypeV9
23e41f4b71Sopenharmony_ci  ```
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci- After change:
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci  ```ts
28e41f4b71Sopenharmony_ci  enum WebHitTestType
29e41f4b71Sopenharmony_ci  ```
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci**Adaptation Guide**
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ciReplace **HitTestTypeV9** with **WebHitTestType**.
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci## cl.web.2 HeaderV9 Name Change
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ciRenamed the struct **HeaderV9** **WebHeader** to meet the naming conventions.
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci**Change Impact**
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ciThe struct **HeaderV9** and APIs that use **HeaderV9** as a parameter or return value cannot be used in OpenHarmony 4.0.3.2 and later versions.
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ci**Key API/Component Changes**
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ci- Involved APIs:
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ci  interface HeaderV9
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci- Before change:
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ci  ```ts
52e41f4b71Sopenharmony_ci  interface HeaderV9
53e41f4b71Sopenharmony_ci  ```
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ci- After change:
56e41f4b71Sopenharmony_ci
57e41f4b71Sopenharmony_ci  ```ts
58e41f4b71Sopenharmony_ci  interface WebHeader
59e41f4b71Sopenharmony_ci  ```
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ci**Adaptation Guide**
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_ciReplace **HeaderV9** with **WebHeader**.
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ci## cl.web.3 Member Change of HitTestValue
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ciRename the member variable **HitTestTypeV9** in the **HitTestValue** struct **WebHitTestType** to meet the naming conventions.
68e41f4b71Sopenharmony_ci
69e41f4b71Sopenharmony_ci**Change Impact**
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ciThe struct **HitTestValue** and APIs that use **HitTestValue** as a parameter or return value cannot be used in OpenHarmony 4.0.3.2 and later versions.
72e41f4b71Sopenharmony_ci
73e41f4b71Sopenharmony_ci**Key API/Component Changes**
74e41f4b71Sopenharmony_ci
75e41f4b71Sopenharmony_ci- Involved APIs:
76e41f4b71Sopenharmony_ci
77e41f4b71Sopenharmony_ci  interface HitTestValue
78e41f4b71Sopenharmony_ci
79e41f4b71Sopenharmony_ci- Before change:
80e41f4b71Sopenharmony_ci
81e41f4b71Sopenharmony_ci  ```ts
82e41f4b71Sopenharmony_ci  interface HitTestValue {
83e41f4b71Sopenharmony_ci
84e41f4b71Sopenharmony_ci    /**
85e41f4b71Sopenharmony_ci      * Get the hit test type.
86e41f4b71Sopenharmony_ci      *
87e41f4b71Sopenharmony_ci      * @since 9
88e41f4b71Sopenharmony_ci      */
89e41f4b71Sopenharmony_ci    type: HitTestTypeV9;
90e41f4b71Sopenharmony_ci
91e41f4b71Sopenharmony_ci    /**
92e41f4b71Sopenharmony_ci      * Get the hit test extra data.
93e41f4b71Sopenharmony_ci      *
94e41f4b71Sopenharmony_ci      * @since 9
95e41f4b71Sopenharmony_ci      */
96e41f4b71Sopenharmony_ci    extra: string;
97e41f4b71Sopenharmony_ci  }
98e41f4b71Sopenharmony_ci  ```
99e41f4b71Sopenharmony_ci
100e41f4b71Sopenharmony_ci- After change:
101e41f4b71Sopenharmony_ci
102e41f4b71Sopenharmony_ci  ```ts
103e41f4b71Sopenharmony_ci  interface HitTestValue {
104e41f4b71Sopenharmony_ci
105e41f4b71Sopenharmony_ci    /**
106e41f4b71Sopenharmony_ci      * Get the hit test type.
107e41f4b71Sopenharmony_ci      *
108e41f4b71Sopenharmony_ci      * @since 9
109e41f4b71Sopenharmony_ci      */
110e41f4b71Sopenharmony_ci    type: WebHitTestType;
111e41f4b71Sopenharmony_ci
112e41f4b71Sopenharmony_ci    /**
113e41f4b71Sopenharmony_ci      * Get the hit test extra data.
114e41f4b71Sopenharmony_ci      *
115e41f4b71Sopenharmony_ci      * @since 9
116e41f4b71Sopenharmony_ci      */
117e41f4b71Sopenharmony_ci    extra: string;
118e41f4b71Sopenharmony_ci  }
119e41f4b71Sopenharmony_ci  ```
120e41f4b71Sopenharmony_ci
121e41f4b71Sopenharmony_ci**Adaptation Guide**
122e41f4b71Sopenharmony_ci
123e41f4b71Sopenharmony_ciReplace **HitTestTypeV9** with **WebHitTestType**.
124e41f4b71Sopenharmony_ci
125e41f4b71Sopenharmony_ci## cl.web.4 Parameter Type Change of loadUrl
126e41f4b71Sopenharmony_ci
127e41f4b71Sopenharmony_ciChanged the type of the **headers** parameter in **loadUrl** to **WebHeader** to meet the naming conventions.
128e41f4b71Sopenharmony_ci
129e41f4b71Sopenharmony_ci**Change Impact**
130e41f4b71Sopenharmony_ci
131e41f4b71Sopenharmony_ciThe **loadUrl** API that uses the **headers** parameter cannot be used in OpenHarmony 4.0.3.2 and later versions.
132e41f4b71Sopenharmony_ci
133e41f4b71Sopenharmony_ci**Key API/Component Changes**
134e41f4b71Sopenharmony_ci
135e41f4b71Sopenharmony_ci- Involved APIs:
136e41f4b71Sopenharmony_ci
137e41f4b71Sopenharmony_ci  loadUrl(url: string | Resource, headers?: Array\<HeaderV9>): void
138e41f4b71Sopenharmony_ci
139e41f4b71Sopenharmony_ci- Before change:
140e41f4b71Sopenharmony_ci
141e41f4b71Sopenharmony_ci  ```ts
142e41f4b71Sopenharmony_ci  loadUrl(url: string | Resource, headers?: Array<HeaderV9>): void
143e41f4b71Sopenharmony_ci  ```
144e41f4b71Sopenharmony_ci
145e41f4b71Sopenharmony_ci- After change:
146e41f4b71Sopenharmony_ci
147e41f4b71Sopenharmony_ci  ```ts
148e41f4b71Sopenharmony_ci  loadUrl(url: string | Resource, headers?: Array<WebHeader>): void
149e41f4b71Sopenharmony_ci  ```
150e41f4b71Sopenharmony_ci
151e41f4b71Sopenharmony_ci**Adaptation Guide**
152e41f4b71Sopenharmony_ci
153e41f4b71Sopenharmony_ciChange the type of the **headers** parameter in **loadUrl** from **HeaderV9** to **WebHeader**.
154e41f4b71Sopenharmony_ci
155e41f4b71Sopenharmony_ci## cl.web.5 Return Value Type Change of getHitTest
156e41f4b71Sopenharmony_ci
157e41f4b71Sopenharmony_ciChanged the return value type of the **getHitTest** API to **WebHitTest** to meet the naming conventions.
158e41f4b71Sopenharmony_ci
159e41f4b71Sopenharmony_ci**Change Impact**
160e41f4b71Sopenharmony_ci
161e41f4b71Sopenharmony_ciThe **getHitTest** API cannot be used in OpenHarmony 4.0.3.2 and later versions.
162e41f4b71Sopenharmony_ci
163e41f4b71Sopenharmony_ci**Key API/Component Changes**
164e41f4b71Sopenharmony_ci
165e41f4b71Sopenharmony_ci- Involved APIs:
166e41f4b71Sopenharmony_ci
167e41f4b71Sopenharmony_ci  getHitTest(): HitTestTypeV9
168e41f4b71Sopenharmony_ci
169e41f4b71Sopenharmony_ci- Before change:
170e41f4b71Sopenharmony_ci
171e41f4b71Sopenharmony_ci  ```ts
172e41f4b71Sopenharmony_ci  getHitTest(): HitTestTypeV9
173e41f4b71Sopenharmony_ci  ```
174e41f4b71Sopenharmony_ci
175e41f4b71Sopenharmony_ci- After change:
176e41f4b71Sopenharmony_ci
177e41f4b71Sopenharmony_ci  ```ts
178e41f4b71Sopenharmony_ci  getHitTest(): WebHitTestType
179e41f4b71Sopenharmony_ci  ```
180e41f4b71Sopenharmony_ci
181e41f4b71Sopenharmony_ci**Adaptation Guide**
182e41f4b71Sopenharmony_ci
183e41f4b71Sopenharmony_ciChange the return value type of the **getHitTest** API from **HitTestTypeV9** to **WebHitTestType**.
184e41f4b71Sopenharmony_ci
185e41f4b71Sopenharmony_ci## cl.web.6 Moving of the WebMessagePort Class
186e41f4b71Sopenharmony_ci
187e41f4b71Sopenharmony_ciMoved the **WebMessagePort** class to **@ohos.web.webview.d.ts** and added error throwing.
188e41f4b71Sopenharmony_ci
189e41f4b71Sopenharmony_ci**Change Impact**
190e41f4b71Sopenharmony_ci
191e41f4b71Sopenharmony_ciIf your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing.
192e41f4b71Sopenharmony_ci
193e41f4b71Sopenharmony_ci**Key API/Component Changes**
194e41f4b71Sopenharmony_ci
195e41f4b71Sopenharmony_ci- Involved APIs:
196e41f4b71Sopenharmony_ci
197e41f4b71Sopenharmony_ci  postMessageEvent(message: WebMessageEvent): void;
198e41f4b71Sopenharmony_ci  onMessageEvent(callback: (result: string) => void): void;
199e41f4b71Sopenharmony_ci
200e41f4b71Sopenharmony_ci- Before change:
201e41f4b71Sopenharmony_ci
202e41f4b71Sopenharmony_ci  ```ts
203e41f4b71Sopenharmony_ci  postMessageEvent(message: WebMessageEvent): void;
204e41f4b71Sopenharmony_ci  onMessageEvent(callback: (result: string) => void): void;
205e41f4b71Sopenharmony_ci  ```
206e41f4b71Sopenharmony_ci
207e41f4b71Sopenharmony_ci- After change:
208e41f4b71Sopenharmony_ci
209e41f4b71Sopenharmony_ci  ```ts
210e41f4b71Sopenharmony_ci  postMessageEvent(message: WebMessage): void;
211e41f4b71Sopenharmony_ci  onMessageEvent(callback: (result: WebMessage) => void): void;
212e41f4b71Sopenharmony_ci  ```
213e41f4b71Sopenharmony_ci
214e41f4b71Sopenharmony_ci**Adaptation Guide**
215e41f4b71Sopenharmony_ci
216e41f4b71Sopenharmony_ciInstead of importing APIs from the original **WebMessagePort** class, import APIs from **@ohos.web.webview** as follows:
217e41f4b71Sopenharmony_ci
218e41f4b71Sopenharmony_ci  ```ts
219e41f4b71Sopenharmony_ci  import web_webview from '@ohos.web.webview';
220e41f4b71Sopenharmony_ci  ```
221e41f4b71Sopenharmony_ci
222e41f4b71Sopenharmony_ci## cl.web.7 Moving of the HitTestValue Class
223e41f4b71Sopenharmony_ci
224e41f4b71Sopenharmony_ciMoved the **HitTestValue** class to **@ohos.web.webview.d.ts**; changed **HitTestValue** from a class to an API; changed the **getType** and **getExtra** from APIs to attributes.
225e41f4b71Sopenharmony_ci
226e41f4b71Sopenharmony_ci**Change Impact**
227e41f4b71Sopenharmony_ci
228e41f4b71Sopenharmony_ciIf your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed.
229e41f4b71Sopenharmony_ci
230e41f4b71Sopenharmony_ci**Key API/Component Changes**
231e41f4b71Sopenharmony_ci
232e41f4b71Sopenharmony_ci- Involved APIs:
233e41f4b71Sopenharmony_ci
234e41f4b71Sopenharmony_ci  getType(): HitTestType;
235e41f4b71Sopenharmony_ci  getExtra(): string;
236e41f4b71Sopenharmony_ci
237e41f4b71Sopenharmony_ci- Before change:
238e41f4b71Sopenharmony_ci
239e41f4b71Sopenharmony_ci  ```ts
240e41f4b71Sopenharmony_ci  getType(): HitTestType;
241e41f4b71Sopenharmony_ci  getExtra(): string;
242e41f4b71Sopenharmony_ci  ```
243e41f4b71Sopenharmony_ci
244e41f4b71Sopenharmony_ci- After change:
245e41f4b71Sopenharmony_ci
246e41f4b71Sopenharmony_ci  ```ts
247e41f4b71Sopenharmony_ci  type: WebHitTestType;
248e41f4b71Sopenharmony_ci  extra: string;
249e41f4b71Sopenharmony_ci  ```
250e41f4b71Sopenharmony_ci
251e41f4b71Sopenharmony_ci**Adaptation Guide**
252e41f4b71Sopenharmony_ci
253e41f4b71Sopenharmony_ciInstead of importing APIs from the original **HitTestValue** class, import APIs from **@ohos.web.webview** as follows:
254e41f4b71Sopenharmony_ci
255e41f4b71Sopenharmony_ci  ```ts
256e41f4b71Sopenharmony_ci  import web_webview from '@ohos.web.webview';
257e41f4b71Sopenharmony_ci  ```
258e41f4b71Sopenharmony_ci
259e41f4b71Sopenharmony_ci## cl.web.8 Moving of API Version 9 APIs Under WebCookie
260e41f4b71Sopenharmony_ci
261e41f4b71Sopenharmony_ciMoved APIs of API version 9 in the **WebCookie** class to **web.webview.webview.WebCookieManager**
262e41f4b71Sopenharmony_ciand added error throwing.
263e41f4b71Sopenharmony_ci
264e41f4b71Sopenharmony_ci**Change Impact**
265e41f4b71Sopenharmony_ci
266e41f4b71Sopenharmony_ciIf your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing.
267e41f4b71Sopenharmony_ciThe APIs in the class are static.
268e41f4b71Sopenharmony_ci
269e41f4b71Sopenharmony_ci**Key API/Component Changes**
270e41f4b71Sopenharmony_ci
271e41f4b71Sopenharmony_ci- Involved APIs:
272e41f4b71Sopenharmony_ci
273e41f4b71Sopenharmony_ci  isCookieAllowed(): boolean;
274e41f4b71Sopenharmony_ci  isThirdPartyCookieAllowed(): boolean;
275e41f4b71Sopenharmony_ci  putAcceptCookieEnabled(accept: boolean): void;
276e41f4b71Sopenharmony_ci  putAcceptThirdPartyCookieEnabled(accept: boolean): void;
277e41f4b71Sopenharmony_ci  setCookie(url: string, value: string): boolean;
278e41f4b71Sopenharmony_ci  saveCookieSync(): boolean;
279e41f4b71Sopenharmony_ci  getCookie(url: string): string;
280e41f4b71Sopenharmony_ci  existCookie(): boolean;
281e41f4b71Sopenharmony_ci  deleteEntireCookie(): void;
282e41f4b71Sopenharmony_ci  deleteSessionCookie(): void;
283e41f4b71Sopenharmony_ci
284e41f4b71Sopenharmony_ci- Before change:
285e41f4b71Sopenharmony_ci
286e41f4b71Sopenharmony_ci  ```ts
287e41f4b71Sopenharmony_ci  isCookieAllowed(): boolean;
288e41f4b71Sopenharmony_ci  isThirdPartyCookieAllowed(): boolean;
289e41f4b71Sopenharmony_ci  putAcceptCookieEnabled(accept: boolean): void;
290e41f4b71Sopenharmony_ci  putAcceptThirdPartyCookieEnabled(accept: boolean): void;
291e41f4b71Sopenharmony_ci  setCookie(url: string, value: string): boolean;
292e41f4b71Sopenharmony_ci  saveCookieSync(): boolean;
293e41f4b71Sopenharmony_ci  getCookie(url: string): string;
294e41f4b71Sopenharmony_ci  existCookie(): boolean;
295e41f4b71Sopenharmony_ci  deleteEntireCookie(): void;
296e41f4b71Sopenharmony_ci  deleteSessionCookie(): void;
297e41f4b71Sopenharmony_ci  ```
298e41f4b71Sopenharmony_ci
299e41f4b71Sopenharmony_ci- After change:
300e41f4b71Sopenharmony_ci
301e41f4b71Sopenharmony_ci  ```ts
302e41f4b71Sopenharmony_ci  static isCookieAllowed(): boolean;
303e41f4b71Sopenharmony_ci  static isThirdPartyCookieAllowed(): boolean;
304e41f4b71Sopenharmony_ci  static putAcceptCookieEnabled(accept: boolean): void;
305e41f4b71Sopenharmony_ci  static putAcceptThirdPartyCookieEnabled(accept: boolean): void;
306e41f4b71Sopenharmony_ci  static setCookie(url: string, value: string): void;
307e41f4b71Sopenharmony_ci  static saveCookieAsync(): Promise<void>;
308e41f4b71Sopenharmony_ci  static saveCookieAsync(callback: AsyncCallback<void>): void;
309e41f4b71Sopenharmony_ci  static getCookie(url: string): string;
310e41f4b71Sopenharmony_ci  static existCookie(): boolean;
311e41f4b71Sopenharmony_ci  static deleteEntireCookie(): void;
312e41f4b71Sopenharmony_ci  static deleteSessionCookie(): void;
313e41f4b71Sopenharmony_ci  ```
314e41f4b71Sopenharmony_ci
315e41f4b71Sopenharmony_ci**Adaptation Guide**
316e41f4b71Sopenharmony_ci
317e41f4b71Sopenharmony_ciInstead of importing APIs from the original **WebCookie** class, import APIs from **@ohos.web.webview** as follows:
318e41f4b71Sopenharmony_ci
319e41f4b71Sopenharmony_ci  ```ts
320e41f4b71Sopenharmony_ci  import web_webview from '@ohos.web.webview';
321e41f4b71Sopenharmony_ci  ```
322e41f4b71Sopenharmony_ci
323e41f4b71Sopenharmony_ci## cl.web.9 Moving of API Version 9 APIs Under WebController
324e41f4b71Sopenharmony_ci
325e41f4b71Sopenharmony_ciMoved APIs of API version 9 in the **WebController** class to **web.webview.webview.WebviewController** and added error throwing.
326e41f4b71Sopenharmony_ci
327e41f4b71Sopenharmony_ci**Change Impact**
328e41f4b71Sopenharmony_ci
329e41f4b71Sopenharmony_ciIf your application is developed based on earlier versions, note that the **d.ts** file storage location and the name of the module to be imported are changed. In addition, be mindful of the error codes now that the APIs in the class support error code processing.
330e41f4b71Sopenharmony_ciThe **getDefaultUserAgent** API is renamed **getUserAgent**.
331e41f4b71Sopenharmony_ci
332e41f4b71Sopenharmony_ci**Key API/Component Changes**
333e41f4b71Sopenharmony_ci
334e41f4b71Sopenharmony_ci- Involved APIs:
335e41f4b71Sopenharmony_ci
336e41f4b71Sopenharmony_ci  zoomIn(): boolean;
337e41f4b71Sopenharmony_ci  zoomOut(): boolean;
338e41f4b71Sopenharmony_ci  createWebMessagePorts(): Array\<WebMessagePort>;
339e41f4b71Sopenharmony_ci  postMessage(options: { message: WebMessageEvent, uri: string}): void;
340e41f4b71Sopenharmony_ci  getHitTestValue(): HitTestValue;
341e41f4b71Sopenharmony_ci  getWebId(): number;
342e41f4b71Sopenharmony_ci  getDefaultUserAgent(): string;
343e41f4b71Sopenharmony_ci  getTitle(): string;
344e41f4b71Sopenharmony_ci  getPageHeight(): number;
345e41f4b71Sopenharmony_ci  backOrForward(step: number): void;
346e41f4b71Sopenharmony_ci  searchAllAsync(searchString: string): void;
347e41f4b71Sopenharmony_ci  clearMatches(): void;
348e41f4b71Sopenharmony_ci  searchNext(forward: boolean): void;
349e41f4b71Sopenharmony_ci  clearSslCache(): void;
350e41f4b71Sopenharmony_ci  clearClientAuthenticationCache(): void;
351e41f4b71Sopenharmony_ci  getUrl(): string;
352e41f4b71Sopenharmony_ci
353e41f4b71Sopenharmony_ci- Before change:
354e41f4b71Sopenharmony_ci
355e41f4b71Sopenharmony_ci  ```ts
356e41f4b71Sopenharmony_ci  zoomIn(): boolean;
357e41f4b71Sopenharmony_ci  zoomOut(): boolean;
358e41f4b71Sopenharmony_ci  createWebMessagePorts(): Array<WebMessagePort>;
359e41f4b71Sopenharmony_ci  postMessage(options: { message: WebMessageEvent, uri: string}): void;
360e41f4b71Sopenharmony_ci  getHitTestValue(): HitTestValue;
361e41f4b71Sopenharmony_ci  getWebId(): number;
362e41f4b71Sopenharmony_ci  getDefaultUserAgent(): string;
363e41f4b71Sopenharmony_ci  getTitle(): string;
364e41f4b71Sopenharmony_ci  getPageHeight(): number;
365e41f4b71Sopenharmony_ci  backOrForward(step: number): void;
366e41f4b71Sopenharmony_ci  searchAllAsync(searchString: string): void;
367e41f4b71Sopenharmony_ci  clearMatches(): void;
368e41f4b71Sopenharmony_ci  searchNext(forward: boolean): void;
369e41f4b71Sopenharmony_ci  clearSslCache(): void;
370e41f4b71Sopenharmony_ci  clearClientAuthenticationCache(): void;
371e41f4b71Sopenharmony_ci  getUrl(): string;
372e41f4b71Sopenharmony_ci  ```
373e41f4b71Sopenharmony_ci
374e41f4b71Sopenharmony_ci- After change:
375e41f4b71Sopenharmony_ci
376e41f4b71Sopenharmony_ci  ```ts
377e41f4b71Sopenharmony_ci  zoomIn(): void;
378e41f4b71Sopenharmony_ci  zoomOut(): void;
379e41f4b71Sopenharmony_ci  createWebMessagePorts(): Array<WebMessagePort>;
380e41f4b71Sopenharmony_ci  postMessage(name: string, ports: Array<WebMessagePort>, uri: string): void;
381e41f4b71Sopenharmony_ci  getHitTestValue(): HitTestValue;
382e41f4b71Sopenharmony_ci  getWebId(): number;
383e41f4b71Sopenharmony_ci  getUserAgent(): string;
384e41f4b71Sopenharmony_ci  getTitle(): string;
385e41f4b71Sopenharmony_ci  getPageHeight(): number;
386e41f4b71Sopenharmony_ci  backOrForward(step: number): void;
387e41f4b71Sopenharmony_ci  searchAllAsync(searchString: string): void;
388e41f4b71Sopenharmony_ci  clearMatches(): void;
389e41f4b71Sopenharmony_ci  searchNext(forward: boolean): void;
390e41f4b71Sopenharmony_ci  clearSslCache(): void;
391e41f4b71Sopenharmony_ci  clearClientAuthenticationCache(): void;
392e41f4b71Sopenharmony_ci  getUrl(): string;
393e41f4b71Sopenharmony_ci  ```
394e41f4b71Sopenharmony_ci
395e41f4b71Sopenharmony_ci**Adaptation Guide**
396e41f4b71Sopenharmony_ci
397e41f4b71Sopenharmony_ciInstead of importing APIs from the original **WebController** class, import APIs from **@ohos.web.webview** as follows:
398e41f4b71Sopenharmony_ci
399e41f4b71Sopenharmony_ci  ```ts
400e41f4b71Sopenharmony_ci  import web_webview from '@ohos.web.webview';
401e41f4b71Sopenharmony_ci  ```
402e41f4b71Sopenharmony_ci
403e41f4b71Sopenharmony_ci## cl.web.10 Moving of the WebAsyncController Class
404e41f4b71Sopenharmony_ci
405e41f4b71Sopenharmony_ciMoved the APIs in the **WebAsyncController** class to the **web.webview.webview.WebviewController** class and added error throwing.
406e41f4b71Sopenharmony_ci
407e41f4b71Sopenharmony_ci**Change Impact**
408e41f4b71Sopenharmony_ci
409e41f4b71Sopenharmony_ciIf your application is developed based on earlier versions, pay attention to error code processing.
410e41f4b71Sopenharmony_ci
411e41f4b71Sopenharmony_ci**Key API/Component Changes**
412e41f4b71Sopenharmony_ci
413e41f4b71Sopenharmony_ci- Involved APIs:
414e41f4b71Sopenharmony_ci
415e41f4b71Sopenharmony_ci  storeWebArchive(baseName: string, autoName: boolean): Promise\<string>;
416e41f4b71Sopenharmony_ci  storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback\<string>): void;
417e41f4b71Sopenharmony_ci
418e41f4b71Sopenharmony_ci- Before change:
419e41f4b71Sopenharmony_ci
420e41f4b71Sopenharmony_ci  ```ts
421e41f4b71Sopenharmony_ci  storeWebArchive(baseName: string, autoName: boolean): Promise<string>;
422e41f4b71Sopenharmony_ci  storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback<string>): void;
423e41f4b71Sopenharmony_ci  ```
424e41f4b71Sopenharmony_ci
425e41f4b71Sopenharmony_ci- After change:
426e41f4b71Sopenharmony_ci
427e41f4b71Sopenharmony_ci  ```ts
428e41f4b71Sopenharmony_ci  storeWebArchive(baseName: string, autoName: boolean): Promise<string>;
429e41f4b71Sopenharmony_ci  storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback<string>): void;
430e41f4b71Sopenharmony_ci  ```
431e41f4b71Sopenharmony_ci
432e41f4b71Sopenharmony_ci**Adaptation Guide**
433e41f4b71Sopenharmony_ci
434e41f4b71Sopenharmony_ciExample:
435e41f4b71Sopenharmony_ci
436e41f4b71Sopenharmony_ci  ```ts
437e41f4b71Sopenharmony_ci  // xxx.ets
438e41f4b71Sopenharmony_ci  import web_webview from '@ohos.web.webview'
439e41f4b71Sopenharmony_ci
440e41f4b71Sopenharmony_ci  @Entry
441e41f4b71Sopenharmony_ci  @Component
442e41f4b71Sopenharmony_ci  struct WebComponent {
443e41f4b71Sopenharmony_ci    controller: web_webview.WebviewController = new web_webview.WebviewController();
444e41f4b71Sopenharmony_ci
445e41f4b71Sopenharmony_ci    build() {
446e41f4b71Sopenharmony_ci      Column() {
447e41f4b71Sopenharmony_ci        Button('saveWebArchive')
448e41f4b71Sopenharmony_ci          .onClick(() => {
449e41f4b71Sopenharmony_ci            try {
450e41f4b71Sopenharmony_ci              this.controller.storeWebArchive("/data/storage/el2/base/", true, (error, filename) => {
451e41f4b71Sopenharmony_ci                if (error) {
452e41f4b71Sopenharmony_ci                  console.info(`save web archive error: ` + JSON.stringify(error))
453e41f4b71Sopenharmony_ci                  return;
454e41f4b71Sopenharmony_ci                }
455e41f4b71Sopenharmony_ci                if (filename != null) {
456e41f4b71Sopenharmony_ci                  console.info(`save web archive success: ${filename}`)
457e41f4b71Sopenharmony_ci                }
458e41f4b71Sopenharmony_ci              });
459e41f4b71Sopenharmony_ci            } catch (error) {
460e41f4b71Sopenharmony_ci              console.error(`ErrorCode: ${error.code},  Message: ${error.message}`);
461e41f4b71Sopenharmony_ci            }
462e41f4b71Sopenharmony_ci          })
463e41f4b71Sopenharmony_ci        Web({ src: 'www.example.com', controller: this.controller })
464e41f4b71Sopenharmony_ci      }
465e41f4b71Sopenharmony_ci    }
466e41f4b71Sopenharmony_ci  }
467e41f4b71Sopenharmony_ci  ```
468