W3C home > Mailing lists > Public > public-secondscreen@w3.org > November 2016

Re: [presentation-api] Clarify event order when establishing a presentation connection

From: François Daoust via GitHub <sysbot+gh@w3.org>
Date: Tue, 15 Nov 2016 13:49:53 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-260645717-1479217792-sysbot+gh@w3.org>
Sorry I missed that issue somehow, @mfoltzgoogle.

I think it is a good idea to be explicit about the task source used. I
 would suggest the "networking task source" [1] (used by browser 
navigation WebRTC, WebSockets), unless there is a good reason to 
create a specific task source or to use more than one?

Wording could be: "The task source for the tasks mentioned in this 
specification is the networking task source".

This would guarantee that the task queued to fire the 
`connectionavailable` event (i) *runs* before the task queued to fire 
the `connect` event (ii).

However, I note that what guarantees that (i) gets *queued* before 
(ii) is not the task source: the steps are run "in parallel" so are 
not tied to the event loop, but "in parallel" steps are still expected
 to run one after another:

Also, Promise resolution is not tied to any task queue, but rather run
 as a microtask, I think (before next task is processed).

[1] http://w3c.github.io/html/webappapis.html#networking-task-source

GitHub Notification of comment by tidoust
Please view or discuss this issue at 
 using your GitHub account
Received on Tuesday, 15 November 2016 13:50:00 UTC

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