- From: <bugzilla@jessica.w3.org>
- Date: Sat, 13 Aug 2011 02:45:44 +0000
- To: public-webapps@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13763 Ian 'Hixie' Hickson <ian@hixie.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |ian@hixie.ch Resolution| |WONTFIX --- Comment #6 from Ian 'Hixie' Hickson <ian@hixie.ch> 2011-08-13 02:45:44 UTC --- It's easy to do this already: var queue = []; websocket.onmessage = function (event) { if (queue.length) queue.shift()(event); }; // to send and then wait for response: websocket.send('foo'); queue.push(function (event) { // rest of function goes here }); ...or some such. Basically works like polling but without having to worry about missing other events if you have other things going on. (code above is untested so may have syntax errors) -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
Received on Saturday, 13 August 2011 02:45:46 UTC