mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add node context/flow/global
This commit is contained in:
@@ -20,7 +20,7 @@ var when = require("when");
|
||||
|
||||
var redUtil = require("../util");
|
||||
var Log = require("../log");
|
||||
|
||||
var context = require("./context");
|
||||
var flows = require("./flows");
|
||||
|
||||
function Node(n) {
|
||||
@@ -63,6 +63,12 @@ Node.prototype.updateWires = function(wires) {
|
||||
}
|
||||
|
||||
}
|
||||
Node.prototype.context = function() {
|
||||
if (!this._context) {
|
||||
this._context = context.get(this._alias||this.id,this.z);
|
||||
}
|
||||
return this._context;
|
||||
}
|
||||
|
||||
Node.prototype._on = Node.prototype.on;
|
||||
|
||||
|
Reference in New Issue
Block a user