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