mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Updated Design: Node Messaging API (markdown)
parent
9581063590
commit
93b91ec2b7
@ -135,3 +135,12 @@ this.on('input', function(msg) {
|
||||
- this relies on the user passing msg through - something that could be a source of programming error.
|
||||
- it would need clear semantics over when it was called and how it relates to `node.error`.
|
||||
|
||||
### Proposal of `function` node extension for Node Messaging API (HN)
|
||||
|
||||
In order to add support for the new style message handler, We propose following extension for `function` node.
|
||||
|
||||
- add `send` and `done` variable that correspond to newly introduced arguments of new style message handler,
|
||||
- add `node.setTimeout` function for specifying node timeout in milliseconds.
|
||||
|
||||
For compatibility with the old style message handler, we expect old style handler is used for `function` node in default (no need for calling `done` callback function).
|
||||
The new style handler can be activated by calling `node.useNewStyleHandler()` or selecting checkbox of setting panel of `function` node.
|
Loading…
Reference in New Issue
Block a user