Anne van Kesteren wrote: > On Mon, Sep 10, 2012 at 10:05 AM, Mike Wilson > <mike...@hotmail.com> wrote: > > Thanks. So I understand it is the HTML specification reference > > that provides details on this behaviour for the XHR spec. > > I'll look further there as its fetching section by itself > > doesn't directly express the relationship between synchronous > > and a stopped event loop (although as a programmer I can infer > > this relationship). > > Well yeah, shit's complicated. HTML fetch can be invoked either > synchronously or asynchronously. When invoked synchronously it's as > part of some task already and since the event loop is not manually > spun no other tasks will run at that time. When invoked asynchronously > HTML fetch itself queues tasks on the event loop that then cause > various things to happen per XMLHttpRequest, such as dispatching > progress events.
Thanks, and yes, for me this section: http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html# event-loops has the sufficient text to define this. On the other hand, in: https://bugzilla.mozilla.org/show_bug.cgi?id=785243 Firefox implementors say that: "sync XHR spins the event loop, so events (including async script execution and whatnot) can fire under a sync XHR call." which seems to suggest that the XHR spec should allow implementations to pump events during a synchronous fetch. What is the XHR spec teams's opinion on this? Best regards Mike