Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote.onstatechange vs. remote.on{connect,connecting,disconnect} #36

Closed
markafoltz opened this issue May 20, 2016 · 2 comments
Closed
Labels

Comments

@markafoltz
Copy link
Contributor

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.

@hober
Copy link
Member

hober commented May 23, 2016

SGTM.

@avayvod avayvod added the F2F label May 24, 2016
@tidoust
Copy link
Member

tidoust commented May 24, 2016

Discussed at F2F:
http://www.w3.org/2016/05/24-webscreens-minutes.html#item04

PROPOSED RESOLUTION: break up the statechange into 3 different events as described in #36 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants