Merge branch 'pr_2498' into dev

This commit is contained in:
Nick O'Leary
2020-05-22 15:22:12 +01:00
10 changed files with 396 additions and 98 deletions

View File

@@ -15,12 +15,14 @@
-->
<script type="text/html" data-help-name="function">
<p>A JavaScript function block to run against the messages being received by the node.</p>
<p>A JavaScript function to run against the messages being received by the node.</p>
<p>The messages are passed in as a JavaScript object called <code>msg</code>.</p>
<p>By convention it will have a <code>msg.payload</code> property containing
the body of the message.</p>
<p>The function is expected to return a message object (or multiple message objects), but can choose
to return nothing in order to halt a flow.</p>
<p>The <b>Setup</b> tab contains code that will be run whenever the node is started.
The <b>Close</b> tab contains code that will be run when the node is stopped.</p>
<h3>Details</h3>
<p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a>
for more information on writing functions.</p>

View File

@@ -210,8 +210,14 @@
"function": "",
"label": {
"function": "Function",
"initialize": "Setup",
"finalize": "Close",
"outputs": "Outputs"
},
"text": {
"initialize": "// Code added here will be run once\n// whenever the node is deployed.\n",
"finalize": "// Code added here will be run when the\n// node is being stopped or re-deployed.\n"
},
"error": {
"inputListener":"Cannot add listener to 'input' event within Function",
"non-message-returned":"Function tried to send a message of type __type__"