From 048a8ed5c314ca9cb8b68fd92b051c0d307d3e56 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Fri, 3 Feb 2023 17:08:45 +0800 Subject: [PATCH] Add doc (13013) Signed-off-by: ester.zhou --- .../OpenHarmony_4.0.2.1/changelog-web.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelog-web.md diff --git a/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelog-web.md b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelog-web.md new file mode 100644 index 0000000000..254050b510 --- /dev/null +++ b/en/release-notes/changelogs/OpenHarmony_4.0.2.1/changelog-web.md @@ -0,0 +1,65 @@ +# 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 + + ```ts + postMessageEvent(message: string): void + ``` + +- After change + + ```ts + 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 + + ```ts + onMessageEvent(callback: (result: string) => void): void + ``` + +- After change + + ```ts + 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. -- GitLab