Where can I find up to date info about RED.events?

This page starts with a big deprecation warning : https://github.com/node-red/node-red/wiki/API-Reference#server-library-register

The API docs aren't really helpful in my case: https://nodered.org/docs/api/modules/v/0.20.0/@node-red_runtime_events.html

I don't think we do have an up to date list of events that isn't in my head or findable in the code by looking for RED.events.emit.

Is there something specific you are interested in?

Trying to figure out how to properly remove event listeners in a private node I'm working on...
Basically, every time I deploy, all my listeners are duplicated.
ES6 arrow functions are fun until you try removing listeners :wink:

Ah right - RED.events is an instance of EventEmitter - https://nodejs.org/docs/latest-v10.x/api/events.html

The only way to remove an event listener is by holding a reference to the function to pass it to RED.events.removeListener(...).

1 Like

Cool, thanks Nick.