nodeEventTarget.emit(type, arg)


  • type <string>
  • arg <any>
  • 返回:<boolean> true 如果已注册针对 type 的事件监听器,否则为 false

Node.js 特定的 EventTarget 类扩展,会将 arg 分发到 type 的处理程序列表中。

🌐 Node.js-specific extension to the EventTarget class that dispatches the arg to the list of handlers for type.