W3C home > Mailing lists > Public > public-webtiming@w3.org > June 2015

Re: Specifying the association with an online timing service

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Wed, 10 Jun 2015 12:05:03 +0200
Message-ID: <55780BCF.2070705@w3.org>
To: Njaal Borch <njaal.borch@norut.no>
CC: Ingar Mæhlum Arntzen <ingar.arntzen@gmail.com>, Francois Daoust <fd@w3.org>, public-webtiming@w3.org
On 10/06/2015 12:00, Njaal Borch wrote:
> On 10 June 2015 at 11:46, Dominique Hazael-Massieux <dom@w3.org
> <mailto:dom@w3.org>> wrote:
>
>     On 10/06/2015 08:32, Njaal Borch wrote:
>
>         there's even the rather horrible race condition in all the two-step
>         versions:
>
>         if somestate execute func1;
>                                     <---  somestate changes
>         somestate.on("change", func1);
>
>
>     I don't think that ("somestate changes") can happen within the
>     semantics of JavaScript — i.e. no state can be changed "in the
>     background" beore the current function stack is fully run through.
>
>
> Can not somestate change if that is for example the readiness of a video
> element?  Presumably things can happen in the browser in parallel even
> if the JS engine does not?

Nope (or rather, that change is not reflected to the engine until the 
current stack is done).

>
> You'd think so, right?  I'm not sure why FF doesn't actually do this,
> but I was assuming it to be because "canplay" has gone from false to
> true before I register the event listener.

It doesn't behave this way for me - the attached test run in Firefox 
displays "ready to play" as expected.

Dom

Received on Wednesday, 10 June 2015 10:05:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:25:14 UTC