1# Web Subsystem ChangeLog 2 3This document describes the web API changes in OpenHarmony 3.2.9.1 SP8 when compared with OpenHarmony 3.2.8.1. 4 5## cl.web.1 Deletion of Unnecessary Error Codes 6 7APIs in the webviewController component of the web subsystem are changed: 8 9 - Deleted **@throws { BusinessError } 17100007 - Invalid back or forward operation** from the **forward**, **backward**, and **backOrForward** APIs. 10 - Deleted **@throws { BusinessError } 17100009 - Cannot zoom in or zoom out** from the **zoom**, **zoomIn**, and **zoomOut** APIs. 11 12You need to adapt your application based on the following information. 13 14**Change Impacts** 15 16Released JS APIs are affected. The application can be properly compiled in the SDK environment of the new version, without any adaptation. 17 18**Key API/Component Changes** 19 20Involved APIs: **forward**, **backward**, **backOrForward**, **zoom**, **zoomIn**, and **zoomOut** 21Involved component: web 22 23**Adaptation Guide** 24 25No adaptation is required. 26## cl.web.2 setWebController Input Parameter Changes 27 28Some released web controllers are migrated to the webviewController, and the original webController is deprecated. The following changes are made in API version 9 and later: 29The input parameter of **setWebController** is replaced by the new **webviewController**. 30 31**Change Impacts** 32 33Input parameters of JS APIs need to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. 34 35**Key API/Component Changes** 36 37- Involved API: 38 39 setWebController(controller: WebviewController): void; 40 41- Before change: 42 43```js 44setWebController(controller: WebController): void; 45``` 46 47- After change: 48 49```js 50setWebController(controller: WebviewController): void; 51``` 52 53**Adaptation Guide** 54 55The sample code is as follows: 56 57Before change: 58 59```js 60// xxx.ets 61@Entry 62@Component 63struct WebComponent { 64 controller:WebController = new WebController() 65 build() { 66 Column() { 67 Web({ src:'www.example.com', controller: this.controller }) 68 .multiWindowAccess(true) 69 .onWindowNew((event) => { 70 console.log("onWindowNew...") 71 var popController: WebController = new WebController() 72 event.handler.setWebController(popController) 73 }) 74 } 75 } 76} 77``` 78 79After change: 80```js 81// xxx.ets 82@Entry 83@Component 84struct WebComponent { 85 controller: web_webview.WebviewController = new web_webview.WebviewController() 86 build() { 87 Column() { 88 Web({ src:'www.example.com', controller: this.controller }) 89 .multiWindowAccess(true) 90 .onWindowNew((event) => { 91 console.log("onWindowNew...") 92 var popController: web_webview.WebviewController = new web_webview.WebviewController() 93 event.handler.setWebController(popController) 94 }) 95 } 96 } 97} 98``` 99 100## cl.web.3 getUnfilterendLinkUrl API Name Change 101 102The **getUnfilterendLinkUrl** API is misspelled and should be changed to **getUnfilteredLinkUrl**. 103 104**Change Impacts** 105 106The JS API name needs to be adapted for applications developed based on earlier versions. Otherwise, relevant functions will be affected. 107 108**Key API/Component Changes** 109 110- Involved API: 111 112 getUnfilteredLinkUrl(): string; 113 114- Before change: 115 116```js 117getUnfilterendLinkUrl(): string; 118``` 119 120- After change: 121 122```js 123getUnfilteredLinkUrl(): string; 124``` 125 126**Adaptation Guide** 127 128The JS API name needs to be adapted for applications developed based on earlier versions. The new API name is used to replace the original one. Otherwise, relevant functions will be affected. 129