1# Web Subsystem Changelog 2 3Compared with earlier versions, OpenHarmony 4.0.2.2 has the following API changes in its web subsystem: 4 5## cl.web.1 Removal of webDebuggingAccess 6 7The definition of the **webDebuggingAccess** API is inappropriate. This API should take effect for all **Web** instances. In light of this, it is removed and replaced by the new API **setWebDebuggingAccess**. 8 9**Change Impacts** 10 11This API must be deprecated and replaced with the **setWebDebuggingAccess** API. 12 13**Key API/Component Changes** 14 15| Class| API Type| Declaration| Change Type| 16| -- | -- | -- | -- | 17|WebAttribute | method | webDebugggingAccess(webDebugggingAccess: boolean): WebAttribute| Deleted | 18 19**Adaptation Guide** 20 21Use the new API **setWebDebuggingAccess**. 22 23## cl.web.2 Adding of setWebDebuggingAccess 24 25Added the static API **setWebDebuggingAccess** to **WebviewController**. It sets whether to enable web debugging works for all **Web** instances. 26 27**Change Impacts** 28 29The original **webDebugggingAccess** API must be replaced with the new API in the application. 30 31**Key API/Component Changes** 32 33| Class| API Type| Declaration| Change Type| 34| -- | -- | -- | -- | 35|webview.WebviewController | method | static setWebDebugggingAccess(webDebugggingAccess: boolean): void| Added| 36 37**Adaptation Guide** 38 39The following exemplifies how to enable web debugging: 40 41```ts 42// xxx.ets 43import web_webview from '@ohos.web.webview'; 44 45@Entry 46@Component 47struct WebComponent { 48 controller: web_webview.WebviewController = new web_webview.WebviewController(); 49 50 aboutToAppear():void { 51 try { 52 web_webview.WebviewController.setWebDebuggingAccess(true); 53 } catch(error) { 54 console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); 55 } 56 } 57 58 build() { 59 Column() { 60 Web({ src: 'www.example.com', controller: this.controller }) 61 } 62 } 63} 64