1
0
Fork 0

JavaScript PropertyChangeListener tweak

Initially fire a property change event on the first subscription
by sending a get to the fg instance.
This commit is contained in:
Torsten Dreyer 2014-09-16 11:16:15 +02:00
parent e72fa5a702
commit 2072b37455

View file

@ -38,6 +38,10 @@ var SetListener = function(path, callback, context ) {
command : 'addListener', command : 'addListener',
node : path node : path
})); }));
PropertyChangeListenerObjects._ws.send(JSON.stringify({
command : 'get',
node : path
}));
} }
o.push({ cb: callback, ctx: context, id: NextListenerId }); o.push({ cb: callback, ctx: context, id: NextListenerId });
return NextListenerId++; return NextListenerId++;