RE: [PageVisibility] Are visibility change events synchronous?

>Specifically what you want to say is that a task is scheduled, and when that task runs it synchronously sets the .hidden/.visibilityState and then fires the event.
>
>I.e. we want the task itself to run asynchronously, but we want various things that happen in the task to happen synchronously relative each other.
>
>I hope that makes sense?

That's my understanding as well. I will update the spec shortly.

Thanks,
Jatinder

-----Original Message-----
From: Jonas Sicking [mailto:jonas@sicking.cc] 
Sent: Thursday, October 06, 2011 5:11 PM
To: Jatinder Mann
Cc: Darin Fisher; Boris Zbarsky; public-web-perf@w3.org
Subject: Re: [PageVisibility] Are visibility change events synchronous?

On Thu, Oct 6, 2011 at 4:12 PM, Jatinder Mann <jmann@microsoft.com> wrote:
> I see your point. Though, the example may not be the best practice, I do agree some developers will hit that scenario.
>
> I think we're all in agreement that the event should fire synchronously. I will update the spec to state that the visibilitychange event will fire synchronously after .hidden/.visibilityState properties have been updated.

Cool! And I agree that it's not best practice, but that people will do it anyway :)

Specifically what you want to say is that a task is scheduled, and when that task runs it synchronously sets the .hidden/.visibilityState and then fires the event.

I.e. we want the task itself to run asynchronously, but we want various things that happen in the task to happen synchronously relative each other.

I hope that makes sense?

/ Jonas

Received on Friday, 7 October 2011 00:24:07 UTC