You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All nodes extend this class. It handles the wiring between nodes and other things. It should not be instantiated directly, rather RED.nodes.createNode should be called from the
constructor of the sub-class.
This function causes messages to be sent on to any nodes wired to this one. A node can have multiple outputs and each output can be wired to multiple nodes.
If msg is undefined, no message is sent on.
If msg is a single message, it is sent to all nodes wired to the first output.
If msg is an array, each element of the array is passed to the corresponding output.
If any of these elements is itself an array, each element of that array is sent to the connected nodes in order.
This function is called when the node is being stopped, for example when a new flow configuration is deployed. This allows the node to release any resources, such as network connections, it has open.
For example, the Inject node clears the timer if one had been set:
Three log level functions are provided for convenience. They format the log message with the time-stamp and ID of the node. If the Debug node is active, the log messages will appear in the debug sidebar.
After defining a node's constructor, it needs to be registered with this function. This must be done immediately after the constructor and before any additional functions are added to its prototype, for example, if the node defines its own close function.
function InjectNode(n) {
...
...
}
RED.nodes.registerType("inject",InjectNode);