addListener

abstract fun addListener(type: String, listener: (arg: Any?) -> Unit)(source)

Node.js-specific extension to the EventTarget class that emulates the equivalent EventEmitter API. The only difference between addListener() and addEventListener() is that addListener() will return a reference to the EventTarget.

Since

v14.5.0