In steps 19 - 23 of start a presentation [1] he intention of the spec (I believe) is that the following will happen in order:
- P is resolved and the resolver function runs to completion.
- The
connectionavailable handler is invoked and runs to completion.
- As part of the steps to establish a presentation connection [2], the
connect handler is invoked or the error handler is invoked (and run to completion).
It occurs to me that since we haven't been explicit about the task sources for various asynchronous steps the browser takes (like establishing a presentation connection) this order is implicit. In our implementatation, a connection can complete in the background while step 20 is running for example.
Do we need to have stronger language in the spec around this @tidoust et al?
[1] https://w3c.github.io/presentation-api/#starting-a-presentation
[2] https://w3c.github.io/presentation-api/#dfn-establish-a-presentation-connection
In steps 19 - 23 of start a presentation [1] he intention of the spec (I believe) is that the following will happen in order:
connectionavailablehandler is invoked and runs to completion.connecthandler is invoked or theerrorhandler is invoked (and run to completion).It occurs to me that since we haven't been explicit about the task sources for various asynchronous steps the browser takes (like establishing a presentation connection) this order is implicit. In our implementatation, a connection can complete in the background while step 20 is running for example.
Do we need to have stronger language in the spec around this @tidoust et al?
[1] https://w3c.github.io/presentation-api/#starting-a-presentation
[2] https://w3c.github.io/presentation-api/#dfn-establish-a-presentation-connection