mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
API documentation updates
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*!
|
||||
* Copyright JS Foundation and other contributors, http://js.foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -14,6 +14,30 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
var events = require("events");
|
||||
var events = require("events");
|
||||
|
||||
module.exports = new events.EventEmitter();
|
||||
module.exports = new events.EventEmitter();
|
||||
|
||||
/**
|
||||
* Runtime events emitter
|
||||
* @mixin @node-red/runtime_events
|
||||
*/
|
||||
|
||||
/**
|
||||
* Register an event listener for a runtime event
|
||||
* @name on
|
||||
* @function
|
||||
* @memberof @node-red/runtime_events
|
||||
* @param {String} eventName - the name of the event to listen to
|
||||
* @param {Function} listener - the callback function for the event
|
||||
*/
|
||||
|
||||
/**
|
||||
* Emit an event to all of its registered listeners
|
||||
* @name emit
|
||||
* @function
|
||||
* @memberof @node-red/runtime_events
|
||||
* @param {String} eventName - the name of the event to emit
|
||||
* @param {any} ...args - the arguments to pass in the event
|
||||
* @return {Boolean} - whether the event had listeners or not
|
||||
*/
|
||||
|
Reference in New Issue
Block a user