harmony 鸿蒙Web Subsystem ChangeLog
Web Subsystem ChangeLog
Compared with earlier versions, OpenHarmony 4.0.2.1 has the following API changes in its Web subsystem:
cl.web.1 Parameter Type Change of postMessageEvent
The postMessageEvent API supported only the string type. In OpenHarmony 4.0.2.1 and later versions, it also supports the ArrayBuffer type.
Change Impacts
The API change is forward compatible. Applications developed based on earlier versions can still use the API, and the original functions are not affected.
Key API/Component Changes
- Involved APIs
postMessageEvent(message: string): void
- Before change
postMessageEvent(message: string): void
- After change
type WebMessage = ArrayBuffer|string
postMessageEvent(message: WebMessage): void
Adaptation Guide
The API change is forward compatible. Applications developed based on earlier versions can still use the API, and the original functions are not affected.
cl.web.2 Parameter Type Change of onMessageEvent
The onMessageEvent API supported only the string type. In OpenHarmony 4.0.2.1 and later versions, it also supports the ArrayBuffer type.
Change Impacts
The 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.
Key API/Component Changes
- Involved APIs
onMessageEvent(callback: (result: string) => void): void
- Before change
onMessageEvent(callback: (result: string) => void): void
- After change
type WebMessage = ArrayBuffer|string
onMessageEvent(callback: (result: WebMessage) => void): void
Adaptation Guide
The 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.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Ability Subsystem ChangeLog
harmony 鸿蒙Bluetooth Subsystem ChangeLog
harmony 鸿蒙Distributed Data Management Subsystem JS API Changelog
harmony 鸿蒙File Management Subsystem ChangeLog
harmony 鸿蒙Globalization Subsystem ChangeLog
harmony 鸿蒙Media Subsystem ChangeLog
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦