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