From 2072b3745535309734697ae76f1ec1e082004f0c Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Tue, 16 Sep 2014 11:16:15 +0200 Subject: [PATCH] JavaScript PropertyChangeListener tweak Initially fire a property change event on the first subscription by sending a get to the fg instance. --- webgui/lib/props.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webgui/lib/props.js b/webgui/lib/props.js index 4eeea84a0..945dfe5c0 100644 --- a/webgui/lib/props.js +++ b/webgui/lib/props.js @@ -38,6 +38,10 @@ var SetListener = function(path, callback, context ) { command : 'addListener', node : path })); + PropertyChangeListenerObjects._ws.send(JSON.stringify({ + command : 'get', + node : path + })); } o.push({ cb: callback, ctx: context, id: NextListenerId }); return NextListenerId++;