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

Need guidance for callback functions. #3068

Closed
jpmedley opened this issue Nov 9, 2018 · 10 comments · Fixed by #14302
Closed

Need guidance for callback functions. #3068

jpmedley opened this issue Nov 9, 2018 · 10 comments · Fixed by #14302
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API question ❔ Issues where a question or problem is stated and a discussion is held to gather opinions.

Comments

@jpmedley
Copy link
Contributor

jpmedley commented Nov 9, 2018

Such as this: https://drafts.csswg.org/resize-observer-1/#resize-observer-callback

There are currently no callbacks listed in BCD and no guidance in the help on how to do them.

@queengooborg queengooborg added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Apr 13, 2019
@queengooborg queengooborg added the question ❔ Issues where a question or problem is stated and a discussion is held to gather opinions. label Aug 31, 2019
@queengooborg
Copy link
Collaborator

Looking around, I found that BCD actually does have some callbacks within the data, for example RTCSessionDescriptionCallback. It appears we're essentially treating them like separate APIs.

@queengooborg
Copy link
Collaborator

Closing this issue since it's stale. Happy to reopen or create a new issue for work on the specific callback!

@ddbeck
Copy link
Collaborator

ddbeck commented Dec 18, 2019

I'm reopening this. Even if that's how we mean to deal with callbacks, we still don't have documentation that tells contributors how to add this data (it's not obvious to me, for example, how you would name a callback feature or where it should be structured in BCD).

@ddbeck ddbeck reopened this Dec 18, 2019
@queengooborg
Copy link
Collaborator

Ah, I see what you mean, good point!

@queengooborg
Copy link
Collaborator

I know this is a pretty stale issue, but since I had last commented, we've removed all of the callbacks from BCD, as well as mdn/content, so we aren't documenting them anymore (especially since the interface attribute that utilizes it will cover its data).

I'm wondering if we should document what BCD won't include in the data guidelines?

@jpmedley
Copy link
Contributor Author

We have?! This particular callback is still supported in Chrome. (At least, it's still in the IDL.) We have 144 more.

@jpmedley
Copy link
Contributor Author

It seems like we shouldn't remove things from MDN or BCD ahead of browsers deprecating and removing them.

@queengooborg
Copy link
Collaborator

There are many WebIDL features that don't make sense to document separately from the interface features that utilize them, including typedefs, enums, and callbacks. These are never directly exposed to web developers, and will never have their own compatibility separate from the interfaces.

@queengooborg
Copy link
Collaborator

Considering we've removed all of the callbacks and are working to remove non-interface data from the API folder (#6810), should we close this issue @ddbeck? Or should we leave it open as a reminder to update our documentation?

@ddbeck
Copy link
Collaborator

ddbeck commented Dec 29, 2021

@queengooborg We haven't quite removed all callbacks. But I've written up a draft guideline that ought to close this issue, if it lands. See #14302.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API question ❔ Issues where a question or problem is stated and a discussion is held to gather opinions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants