diff --git a/Design:-Node-Messaging-API.md b/Design:-Node-Messaging-API.md index 8a7ef47..6fac7ac 100644 --- a/Design:-Node-Messaging-API.md +++ b/Design:-Node-Messaging-API.md @@ -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. \ No newline at end of file