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

Clarify cross-element uniqueness requirements of callbackId #85

Closed
markafoltz opened this issue May 10, 2017 · 1 comment
Closed

Clarify cross-element uniqueness requirements of callbackId #85

markafoltz opened this issue May 10, 2017 · 1 comment

Comments

@markafoltz
Copy link
Contributor

From #83 (comment)

@avayvod: I think this example implies the callback ids must be unique across all the media elements within a browser session which is not true. They only must be unique for each media element alone. An example is a counter in the media element's scope, that's set to 0 when the media element is created and is incremented each time its value is returned by watchAvailability() for this particular element as the callback id.

@mfoltzgoogle: That seems inconvenient if a page is watching availability on multiple elements and wants to keep the callbacks in a Map or otherwise track the set of callbacks by id.

@avayvod: Fair point. It might be more likely having one callback per many elements compared to many callbacks for a single element. The spec doesn't guarantee any cross-element uniqueness of the ids at the moment though.

CC @mounirlamouri @jernoble

@markafoltz
Copy link
Contributor Author

Closing as I believe this is addressed by the PR.

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

No branches or pull requests

1 participant