nodeEventTarget.once(type, listener[, options])
-
type
<string> -
listener
<Function> | <EventListener> -
options
<Object> -
返回: <EventTarget> 自身
EventTarget
类的 Node.js 特定扩展,它为给定的事件 type
添加了 once
监听器。
这相当于调用 on
并将 once
选项设置为 true
。
-
type
<string> -
listener
<Function> | <EventListener> -
options
<Object> -
Returns: <EventTarget> this
Node.js-specific extension to the EventTarget
class that adds a once
listener for the given event type
. This is equivalent to calling on
with the once
option set to true
.