diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-04-26 12:06:50 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-04-26 12:06:50 -0400 |
commit | 262dbeac787ad3aecb28c470484eb3fc8d036d93 (patch) | |
tree | 7858880749ad9c4646531a28eab648cca2a81cca /plugins/Comet/updatetimeline.js | |
parent | 056d0a2555bb6783a2bb4632d2c6ad9f52dde5ec (diff) |
Some updates for testing Comet
Diffstat (limited to 'plugins/Comet/updatetimeline.js')
-rw-r--r-- | plugins/Comet/updatetimeline.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/Comet/updatetimeline.js b/plugins/Comet/updatetimeline.js index f4da1f47c..6612b5116 100644 --- a/plugins/Comet/updatetimeline.js +++ b/plugins/Comet/updatetimeline.js @@ -1,3 +1,30 @@ // update the local timeline from a Comet server // +var updater = function() +{ + var _handshook = false; + var _connected = false; + var _cometd; + + return { + init: function() + { + _cometd = $.cometd; // Uses the default Comet object + _cometd.init(_timelineServer); + _cometd.subscribe(_timeline, this, receive); + $(window).unload(leave); + } + } + + function leave() + { + _cometd.disconnect(); + } + + function receive(message) + { + var noticeItem = makeNoticeItem(message.data); + var noticeList = $('ul.notices'); + } +}(); |