Skip to main content

emit

Description:

  Emits a global event with the given name and arguments to all listeners registered by node:gslot() function.

Signature:

emit: function(eventName: string, ...: any)

Parameters:

ParameterTypeDescription
eventNamestringThe name of the event to emit.
......anyThe data to pass to the global event listeners.