Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
LYS86 committed Oct 7, 2022
1 parent bb578a2 commit 69c40cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions events.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,7 @@ myEE.emit('foo');
// a
```

## EventEmitter.once(eventName, listener)#

## EventEmitter.once(eventName, listener)
- `eventName` {any} 事件名
- `listener` {Function} 回调函数

Expand Down Expand Up @@ -639,7 +638,8 @@ myEmitter.emit('event');

返回一个 EventEmitter 引用,可以链式调用。

# events.broadcast: 脚本间广播
# events.broadcast
脚本间广播

脚本间通信除了使用 engines 模块提供的`ScriptEngine.emit()`方法以外,也可以使用 events 模块提供的 broadcast 广播。

Expand Down

0 comments on commit 69c40cb

Please sign in to comment.