1e41f4b71Sopenharmony_ci# Web Subsystem ChangeLog 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciCompared with earlier versions, OpenHarmony 4.0.2.1 has the following API changes in its Web subsystem: 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci## cl.web.1 Parameter Type Change of postMessageEvent 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciThe **postMessageEvent** API supported only the string type. In OpenHarmony 4.0.2.1 and later versions, it also supports the ArrayBuffer type. 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci**Change Impacts** 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ciThe API change is forward compatible. Applications developed based on earlier versions can still use the API, and the original functions are not affected. 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci**Key API/Component Changes** 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci- Involved APIs 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci postMessageEvent(message: string): void 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci- Before change 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci ```ts 22e41f4b71Sopenharmony_ci postMessageEvent(message: string): void 23e41f4b71Sopenharmony_ci ``` 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci- After change 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ci ```ts 28e41f4b71Sopenharmony_ci type WebMessage = ArrayBuffer | string 29e41f4b71Sopenharmony_ci postMessageEvent(message: WebMessage): void 30e41f4b71Sopenharmony_ci ``` 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci**Adaptation Guide** 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ciThe API change is forward compatible. Applications developed based on earlier versions can still use the API, and the original functions are not affected. 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci## cl.web.2 Parameter Type Change of onMessageEvent 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ciThe **onMessageEvent** API supported only the string type. In OpenHarmony 4.0.2.1 and later versions, it also supports the ArrayBuffer type. 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci**Change Impacts** 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ciThe API change is forward compatible. Applications developed based on earlier versions can still use the API. With the corresponding logic handling added, the original functions are not affected. 43e41f4b71Sopenharmony_ci 44e41f4b71Sopenharmony_ci**Key API/Component Changes** 45e41f4b71Sopenharmony_ci 46e41f4b71Sopenharmony_ci- Involved APIs 47e41f4b71Sopenharmony_ci 48e41f4b71Sopenharmony_ci onMessageEvent(callback: (result: string) => void): void 49e41f4b71Sopenharmony_ci 50e41f4b71Sopenharmony_ci- Before change 51e41f4b71Sopenharmony_ci 52e41f4b71Sopenharmony_ci ```ts 53e41f4b71Sopenharmony_ci onMessageEvent(callback: (result: string) => void): void 54e41f4b71Sopenharmony_ci ``` 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci- After change 57e41f4b71Sopenharmony_ci 58e41f4b71Sopenharmony_ci ```ts 59e41f4b71Sopenharmony_ci type WebMessage = ArrayBuffer | string 60e41f4b71Sopenharmony_ci onMessageEvent(callback: (result: WebMessage) => void): void 61e41f4b71Sopenharmony_ci ``` 62e41f4b71Sopenharmony_ci 63e41f4b71Sopenharmony_ci**Adaptation Guide** 64e41f4b71Sopenharmony_ci 65e41f4b71Sopenharmony_ciThe API change is forward compatible. Applications developed based on earlier versions can still use the API. With the corresponding logic handling added, the original functions are not affected. 66