1# ArkUI Subsystem Changelog 2 3## cl.arkui.1 Return Value Type Change of getInspectorTree 4 5**Change Impact** 6 7The code that uses the **getInspectorTree** API in versions earlier than OpenHarmony 3.2.10.7 must be adapted. 8 9**Key API/Component Changes** 10 11The return value of the **getInspectorTree** API is changed from the string type to the Object type. 12 13**Adaptation Guide** 14 15Adapt the code that takes the return value of **getInspectorTree** as a string.The sample code is as follows: 16 17- Before change: 18 19```typescript 20console.info(getInspectorTree()) 21``` 22 23- After change: 24 25```typescript 26console.info(JSON.stringify(getInspectorTree())) 27``` 28 29## cl.arkui.2 Deprecation the forceRebuild Attribute of \<GridItem> 30 31**Change Impact** 32 33None. The attribute has no effect. 34 35**Key API/Component Changes** 36 37Deprecate the **forceRebuild** attribute of the **\<GridItem>** component. 38 39**Adaptation Guide** 40 41Delete the code that uses the **forceRebuild** attribute. This will not affect the functionality of the **\<GridItem>** component. 42 43## cl.arkui.3 Plugin Module API Changes 44 45 46### 1. API Change in the **PluginComponentTemplate** Module 47 48Renamed the **ability** parameter **bundleName** to more clearly indicate the intended meaning. 49 50You need to adapt your application. 51 52 53 54**Change Impact** 55 56The application developed based on earlier versions must be adapted to the change. Otherwise, build errors will occur. 57 58 59 60**Key API/Component Changes** 61 62- Involved APIs: 63 64 interface PluginComponentTemplate { 65 source: string; 66 bundleName: string; 67 } 68 69 interface PluginComponentInterface { 70 (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; 71} 72 73- Before change: 74 75```js 76 interface PluginComponentTemplate { source: string; ability: string; } 77 interface PluginComponentInterface { 78 (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; 79 } 80``` 81 82- After change: 83 84```js 85 interface PluginComponentTemplate { source: string; bundleName: string; } 86 interface PluginComponentInterface { 87 (value: { template: PluginComponentTemplate; data: any }): PluginComponentAttribute; 88 } 89``` 90 91**Adaptation Guide** 92 93Use the new API. The sample code is as follows: 94 95- Before change: 96```js 97PluginComponent({ 98 template: { source: 'plugincomponent1', ability: 'com.example.plugin' }, 99 data: { 'countDownStartValue': 'new countDownStartValue' } 100}).size({ width: 500, height: 100 }) 101``` 102 103- After change: 104```js 105PluginComponent({ 106 template: { source: 'plugincomponent1', bundleName: 'com.example.plugin' }, 107 data: { 'countDownStartValue': 'new countDownStartValue' } 108}).size({ width: 500, height: 100 }) 109``` 110 111### 2. API Change in the **pluginComponentManager** Module 112 113Renamed the **want** parameter **target** to more clearly indicate the intended meaning. 114 115You need to adapt your application. 116 117 118 119**Change Impact** 120 121The application developed based on earlier versions must be adapted to the change. Otherwise, alarms will arise. Though the build may be successful, the API will not work as intended. 122 123 124 125**Key API/Component Changes** 126 127- Involved APIs: 128 129 interface PushParameterForStage { 130 owner: Want; 131 target: Want; 132 name: string; 133 data: KVObject; 134 extraData: KVObject; 135 jsonPath?: string; 136 } 137 138 function push(param: PushParameterForStage, callback: AsyncCallback\<void>): void; 139 140 interface RequestParameterForStage { 141 owner: Want; 142 target: Want; 143 name: string; 144 data: KVObject; 145 jsonPath?: string; 146 } 147 148 function request(param: RequestParameterForStage, callback: AsyncCallback\<RequestCallbackParameters>): void; 149 150- Before change: 151 152```js 153 interface PushParameterForStage { 154 owner: Want; 155 want: Want; 156 name: string; 157 data: KVObject; 158 extraData: KVObject; 159 jsonPath?: string; 160 } 161 162 function push(param: PushParameterForStage, callback: AsyncCallback<void>): void; 163 164 interface RequestParameterForStage { 165 owner: Want; 166 want: Want; 167 name: string; 168 data: KVObject; 169 jsonPath?: string; 170 } 171 172 function request(param: RequestParameterForStage, callback: AsyncCallback<RequestCallbackParameters>): void; 173``` 174 175- After change: 176 177```js 178 interface PushParameterForStage { 179 owner: Want; 180 target: Want; 181 name: string; 182 data: KVObject; 183 extraData: KVObject; 184 jsonPath?: string; 185 } 186 187 function push(param: PushParameterForStage, callback: AsyncCallback<void>): void; 188 189 interface RequestParameterForStage { 190 owner: Want; 191 target: Want; 192 name: string; 193 data: KVObject; 194 jsonPath?: string; 195 } 196 197 function request(param: RequestParameterForStage, callback: AsyncCallback<RequestCallbackParameters>): void; 198``` 199 200**Adaptation Guide** 201 202Use the new API. The sample code is as follows: 203 204- Before change: 205```js 206import pluginComponentManager from '@ohos.pluginComponent' 207 208pluginComponentManager.push({ 209 owner:{ 210 bundleName:"com.example.provider", 211 abilityName:"com.example.provider.MainAbility" 212 }, 213 want: { 214 bundleName: "com.example.provider", 215 abilityName: "com.example.provider.MainAbility", 216 }, 217 name: "ets/pages/plugin2.js", 218 data: { 219 "js": "ets/pages/plugin.js", 220 "key_1": 1111, 221 }, 222 extraData: { 223 "extra_str": "this is push event" 224 }, 225 jsonPath: "", 226 }, 227 (err, data) => { 228 console.log("push_callback:err: " ,JSON.stringify(err)); 229 console.log("push_callback:data: " , JSON.stringify(data)); 230 console.log("push_callback: push ok!"); 231 } 232) 233 234pluginComponentManager.request({ 235 owner:{ 236 bundleName:"com.example.provider", 237 abilityName:"com.example.provider.MainAbility" 238 }, 239 want: { 240 bundleName: "com.example.provider", 241 abilityName: "ets/pages/plugin2.js", 242 }, 243 name: "plugintemplate", 244 data: { 245 "key_1": " myapplication plugin component test", 246 "key_2": 123456 247 }, 248 jsonPath: "", 249}, 250 (err, data) => { 251 console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) 252 console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) 253 } 254) 255``` 256 257- After change: 258```js 259import pluginComponentManager from '@ohos.pluginComponent' 260 261pluginComponentManager.push({ 262 owner:{ 263 bundleName:"com.example.provider", 264 abilityName:"com.example.provider.MainAbility" 265 }, 266 target: { 267 bundleName: "com.example.provider", 268 abilityName: "com.example.provider.MainAbility", 269 }, 270 name: "ets/pages/plugin2.js", 271 data: { 272 "js": "ets/pages/plugin.js", 273 "key_1": 1111, 274 }, 275 extraData: { 276 "extra_str": "this is push event" 277 }, 278 jsonPath: "", 279 }, 280 (err, data) => { 281 console.log("push_callback:err: " ,JSON.stringify(err)); 282 console.log("push_callback:data: " , JSON.stringify(data)); 283 console.log("push_callback: push ok!"); 284 } 285) 286 287pluginComponentManager.request({ 288 owner:{ 289 bundleName:"com.example.provider", 290 abilityName:"com.example.provider.MainAbility" 291 }, 292 target: { 293 bundleName: "com.example.provider", 294 abilityName: "ets/pages/plugin2.js", 295 }, 296 name: "plugintemplate", 297 data: { 298 "key_1": " myapplication plugin component test", 299 "key_2": 123456 300 }, 301 jsonPath: "", 302}, 303 (err, data) => { 304 console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) 305 console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) 306 } 307) 308``` 309 310## cl.arkui.4 Disabling Online Images for JS Widgets in \<FormComponent> 311 312Disabled online images for JS widgets in the **\<FormComponent>**. 313 314**Change Impact** 315 316 After the change, JS widgets in the **\<FormComponent>** cannot load or display online images. You are advised to save online images to the memory to display them in JS widgets. 317