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

Consider disallowing multiple [LegacyFactoryFunction] identifiers per interface #878

Open
ExE-Boss opened this issue Apr 29, 2020 · 4 comments

Comments

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Apr 29, 2020

Currently, the following is allowed:

[LegacyFactoryFunction=A(),
 LegacyFactoryFunction=B(optional DOMString src),
 LegacyFactoryFunction=C(optional long width, optional long height)]
interface MultipleLegacyFactoryFunctionInterface {};

But it’s not used anywhere, and Chromium’s WebIDL processor doesn’t support it, and WebIDL2JS doesn’t intend to support it either (jsdom/webidl2js#213 (comment)).


This doesn’t intend to deprecate overloaded [LegacyFactoryFunction]s, which share the same identifier:

[LegacyFactoryFunction=Overloaded(),
 LegacyFactoryFunction=Overloaded(optional DOMString src),
 LegacyFactoryFunction=Overloaded(optional long width, optional long height)]
interface OverloadedLegacyFactoryFunctionInterface {};

See also

@ExE-Boss ExE-Boss changed the title Disallow multiple [LegacyFactoryFunction] identifiers per interface Consider disallowing multiple [LegacyFactoryFunction] identifiers per interface Apr 29, 2020
@annevk
Copy link
Member

annevk commented Apr 30, 2020

Do we need overloaded though? HTML doesn't use it.

@domenic
Copy link
Member

domenic commented Apr 30, 2020

Right, I think we should pare down LegacyFactoryFunction to the minimum, probably.

@TimothyGu
Copy link
Member

Neither Blink nor Gecko allows multiple NamedConstructors either.

@domenic
Copy link
Member

domenic commented Mar 22, 2021

We should in fact deprecate overloaded [LegacyFactoryFunction]s since nothing uses them and nothing will do so.

@ExE-Boss ExE-Boss changed the title Consider disallowing multiple [LegacyFactoryFunction] identifiers per interface Consider disallowing multiple [LegacyFactoryFunction] identifiers per interface Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants