On Wed, 9 Dec 2009, Jonas Sicking wrote: > On Wed, Dec 9, 2009 at 9:34 AM, Ian Hickson <i...@hixie.ch> wrote: > > On Wed, 9 Dec 2009, Alexey Proskuryakov wrote: > >> > >> Data from network is only processed as an event loop task > > > > I do not believe this is accurate. It certainly isn't what is specced. > > In XMLHttpRequest this is certainly accurate. You will never see > .responseText changing in the middle of an execution thread, it's > always changed in response of a task run from the event loop.
Sure. From the spec's point of view, a task is queued by the background network thread to update the responseText attribute. (I haven't checked if that's how Anne actually specced it, but something to that effect is needed, otherwise you can see the attribute changing from under you in a running script.) I'm absolutely fine with changing WebSocket to change readyState as part of the same task that dispatches the event, but we can't just say there's no task, that makes no sense. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'