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

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:
http://www.w3.org/TR/html51/infrastructure.html#in-parallel

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 
https://github.com/w3c/presentation-api/issues/360#issuecomment-260645717
 using your GitHub account

Received on Tuesday, 15 November 2016 13:50:00 UTC