emitter.listenerCount(eventName[, listener])
-
eventName<string> | <symbol> 正在监听的事件的名称¥
eventName<string> | <symbol> The name of the event being listened for -
listener<Function> 事件处理函数¥
listener<Function> The event handler function -
返回:<integer>
¥Returns: <integer>
返回监听名为 eventName 的事件的监听器数量。如果提供了 listener,它将返回在事件的监听器列表中找到监听器的次数。
¥Returns the number of listeners listening for the event named eventName.
If listener is provided, it will return how many times the listener is found
in the list of the listeners of the event.