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

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

From: Mark Foltz via GitHub <sysbot+gh@w3.org>
Date: Fri, 20 May 2016 18:33:09 +0000
To: public-secondscreen@w3.org
Message-ID: <issues.opened-156024443-1463769188-sysbot+gh@w3.org>
mfoltzgoogle has just created a new issue for 

== 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 

(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 
Received on Friday, 20 May 2016 18:33:10 UTC

This archive was generated by hypermail 2.3.1 : Friday, 20 May 2016 18:33:11 UTC