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

Only put args into the dfn text of functions when there's an overload present #1733

Open
tabatkins opened this issue Jul 10, 2020 · 0 comments

Comments

@tabatkins
Copy link
Collaborator

Currently, Bikeshed autoformats the dfn text of IDL methods to include the argument names, and relies on the "spelling variation" feature to handle autolinking to them without args (so you can just write {{Element/appendChild()}}, for example). This is because overloads are separate entities in WebIDL that need to be independently linkable, so I use the arglist to differentiate them.

In w3c/reffy#336, @dontcallmedom points out that WebIDL now requires overloads to show up in the same, non-partial, interface definition; they can't be spread out over blocks or specs. This is great, as it means I can now detect at build-time whether an overload is present or not, and thus I can output the arg-full dfn text only when there's an overload; in all other cases I can just make the text the argless version and make everything dramatically simpler.

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

2 participants