From fdc89e8328b2386259ac53f619f497655b87783c Mon Sep 17 00:00:00 2001 From: portix Date: Wed, 18 Apr 2012 12:42:49 +0200 Subject: Return id from connect --HG-- branch : scripts --- scripts/lib/signals.js | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'scripts') diff --git a/scripts/lib/signals.js b/scripts/lib/signals.js index b01b2361..74b8e31f 100644 --- a/scripts/lib/signals.js +++ b/scripts/lib/signals.js @@ -1,32 +1,44 @@ -Object.defineProperty(signals, "registered", { +Object.defineProperty(signals, "_registered", { value : {} }); +Object.defineProperty(signals, "_maxId", { + value : 0, + writable : true +}); Object.defineProperty(signals, "emit", { value : function(sig, wv, o) { - var sigs = signals.registered[sig]; + var sigs = signals._registered[sig]; for (var i=0; i