[presentation-api] Pull Request: Adds a new "connecting" state and per-state event handlers.

mfoltzgoogle has just submitted a new pull request for 
https://github.com/w3c/presentation-api:

== Adds a new "connecting" state and per-state event handlers. ==
[WIP pull request]

This PR addresses the following issues:

* https://github.com/w3c/presentation-api/issues/217
* https://github.com/w3c/presentation-api/issues/216
* https://github.com/w3c/presentation-api/issues/198
* https://github.com/w3c/presentation-api/issues/149

Summary of changes:

* Adds a new "connecting" state to the PresentationConnection (Issue 
#214)
* Adds per-state event handlers `onconnected`, `onclosed` and 
`onterminated` to replace `onstatechange` (Issue #149)
* Adds a `PresentationConnectionCloseEvent` with details on why a 
connection was closed (Issue #149).
* Refine example code and algorithms to clarify initial presentation 
states and ensure message sending happens at the right time.  (Issue 
#198, Issue #216)

TODO:

* There is a failure in ReSpec processing, still debugging
* Specify whether message sending can happen to a connection a 
`connecting` state.  (I think not.)
* In case of disconnection, provide some means for the page to know 
which messages were actually sent.


See https://github.com/w3c/presentation-api/pull/227

Received on Tuesday, 15 December 2015 16:25:42 UTC