Skip to content

Commit 82edddc

Browse files
committed
fix: typo of codeblock in event-propagation
Change-Id: Idb6edb9d268a9170b5c2b1ba5606e789f1a099b4
1 parent e913d61 commit 82edddc

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

docs/en/guide/interaction/event-handling/event-propagation.mdx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,24 @@ For the client, the example is as follows:
188188
</PlatformTabs.Tab>
189189
190190
<PlatformTabs.Tab platform="android">
191-
```java // You can call the sendGlobalEvent function of LynxContext // The
192-
first parameter is the event name monitored by the front end, and the second
193-
parameter is the data received by the front end
194-
LynxContext.sendGlobalEvent("eventName", args); // Or call the sendGlobalEvent
195-
function of LynxView LynxView.sendGlobalEvent("eventName", args); ```
191+
192+
```java
193+
// You can call the sendGlobalEvent function of LynxContext
194+
// The first parameter is the event name monitored by the front end, and the second parameter is the data received by the front end
195+
LynxContext.sendGlobalEvent("eventName", args); // Or call the sendGlobalEvent function of LynxView
196+
LynxView.sendGlobalEvent("eventName", args);
197+
```
198+
196199
</PlatformTabs.Tab>
197200

198201
<PlatformTabs.Tab platform="harmony">
202+
199203
```js
200204
// You can call the sendGlobalEvent function of LynxContext
201205
// The first parameter is the event name monitored by the front end, and the second parameter is the data received by the front end
202-
LynxContext.sendGlobalEvent("eventName", args);
206+
LynxContext.sendGlobalEvent('eventName', args);
203207
```
208+
204209
</PlatformTabs.Tab>
205210
</PlatformTabs>
206211

docs/zh/guide/interaction/event-handling/event-propagation.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,20 +178,26 @@ import { PlatformTabs, Go } from '@lynx';
178178

179179
<PlatformTabs queryKey="platform">
180180
<PlatformTabs.Tab platform="ios">
181+
181182
```objective-c
182183
// 可以调用 LynxContext 的 sendGlobalEvent 函数
183184
// 第一个参数为前端监听的事件名称,第二个参数为前端接收到的数据
184185
[LynxContext sendGlobalEvent:@"eventName" withParams:args];
185186
// 或者调用 LynxView 的 sendGlobalEvent 函数
186187
[LynxView sendGlobalEvent:@"eventName" withParams:args];
187188
```
189+
188190
</PlatformTabs.Tab>
189191
190192
<PlatformTabs.Tab platform="android">
191-
```java // 可以调用 LynxContext 的 sendGlobalEvent 函数 //
192-
第一个参数为前端监听的事件名称,第二个参数为前端接收到的数据
193-
LynxContext.sendGlobalEvent("eventName", args); // 或者调用 LynxView
194-
的sendGlobalEvent 函数 LynxView.sendGlobalEvent("eventName", args); ```
193+
194+
```java
195+
// 可以调用 LynxContext 的 sendGlobalEvent 函数
196+
// 第一个参数为前端监听的事件名称,第二个参数为前端接收到的数据
197+
LynxContext.sendGlobalEvent("eventName", args); // 或者调用 LynxView 的sendGlobalEvent 函数
198+
LynxView.sendGlobalEvent("eventName", args);
199+
```
200+
195201
</PlatformTabs.Tab>
196202

197203
<PlatformTabs.Tab platform="harmony">

0 commit comments

Comments
 (0)