[remote-playback] remote.onstatechange vs. remote.on{connect, connecting, disconnect}

mfoltzgoogle has just created a new issue for 
https://github.com/w3c/remote-playback:

== remote.onstatechange vs. remote.on{connect,connecting,disconnect} 
==
In the Presentation API, we converted the API from having one 
statechange event to distinct events for each state, to improve 
developer ergonomics: fewer if/then/else blocks in a monolithic event 
handler.

(I can't find the specific GH issue where this was discussed, since I 
think it was an offshoot of other API discussions. Can dig some more 
if interested.)

Perhaps the Remote Playback API should do the same:

```
partial interface RemotePlayback : EventTarget {
            attribute EventHandler onconnect;
            attribute EventHandler ondisconnect;
};
```

However, the initial value of `remote.state` does not seem to be 
defined; that would need to be addressed to determine whether an 
additional `connecting` event is necessary.
 

Please view or discuss this issue at 
https://github.com/w3c/remote-playback/issues/36 using your GitHub 
account

Received on Friday, 20 May 2016 18:33:10 UTC