mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'pr_2498' into dev
This commit is contained in:
@@ -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>
|
||||
|
@@ -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__"
|
||||
|
@@ -15,10 +15,11 @@
|
||||
-->
|
||||
|
||||
<script type="text/html" data-help-name="function">
|
||||
<p>受信メッセージに対して処理を行うJavaScriptコード(関数の本体)を定義します。</p>
|
||||
<p>受信メッセージに対して処理を行うJavaScriptコード(関数の本体)を<b>Function</b>タブに定義します。</p>
|
||||
<p>入力メッセージは<code>msg</code>という名称のJavaScriptオブジェクトで受け渡されます。</p>
|
||||
<p><code>msg</code>オブジェクトは<code>msg.payload</code>プロパティにメッセージ本体を保持するのが慣例です。</p>
|
||||
<p>通常、コードはメッセージオブジェクト(もしくは複数のメッセージオブジェクト)を返却します。後続フローの実行を停止したい場合は、オブジェクトを返却しなくてもかまいません。</p>
|
||||
<p>Node-REDの開始時もしくはフローの設定をデプロイした際実行される初期化コードを<b>初期化処理</b>タブに、ノードの停止もしくは再デプロイ時に実行される終了処理コードを<b>終了処理</b>タブに指定できます。</p>
|
||||
<h3>詳細</h3>
|
||||
<p>コードの書き方の詳細については、<a target="_blank" href="http://nodered.org/docs/writing-functions.html">オンラインドキュメント</a>を参照してください。</p>
|
||||
<h4>メッセージの送信</h4>
|
||||
|
@@ -208,8 +208,14 @@
|
||||
"function": "",
|
||||
"label": {
|
||||
"function": "コード",
|
||||
"initialize": "初期化処理",
|
||||
"finalize": "終了処理",
|
||||
"outputs": "出力数"
|
||||
},
|
||||
"text": {
|
||||
"initialize": "// ここのコードはノードのデプロイ時に一度実行されます。\n",
|
||||
"finalize": "// ここのコードはノードの停止もしくは再デプロイ時に実行されます。\n"
|
||||
},
|
||||
"error": {
|
||||
"inputListener": "コード内で'input'イベントのリスナを設定できません",
|
||||
"non-message-returned": "Functionノードが __type__ 型のメッセージ送信を試みました"
|
||||
|
Reference in New Issue
Block a user