Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
| Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | if ((response.primaryObjectPHID in page_objects) && | ||||
| }; | }; | ||||
| } | } | ||||
| }); | }); | ||||
| var client = new JX.Aphlict( | var client = new JX.Aphlict( | ||||
| config.websocketURI, | config.websocketURI, | ||||
| config.subscriptions); | config.subscriptions); | ||||
| var start_client = function() { | |||||
| client | client | ||||
| .setHandler(onAphlictMessage) | .setHandler(onAphlictMessage) | ||||
| .start(); | .start(); | ||||
| }; | |||||
| // Don't start the client until other behaviors have had a chance to | |||||
| // initialize. In particular, we want to capture events into the log for | |||||
| // the DarkConsole "Realtime" panel. | |||||
| setTimeout(start_client, 0); | |||||
| JX.Stratcom.listen( | JX.Stratcom.listen( | ||||
| 'quicksand-redraw', | 'quicksand-redraw', | ||||
| null, | null, | ||||
| function (e) { | function (e) { | ||||
| var old_data = e.getData().oldResponse; | var old_data = e.getData().oldResponse; | ||||
| var new_data = e.getData().newResponse; | var new_data = e.getData().newResponse; | ||||
| client.clearSubscriptions(old_data.subscriptions); | client.clearSubscriptions(old_data.subscriptions); | ||||
| Show All 26 Lines | |||||