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

Link constructors in WebIDL #394

Closed
jyasskin opened this issue Jan 23, 2015 · 4 comments · Fixed by #2499
Closed

Link constructors in WebIDL #394

jyasskin opened this issue Jan 23, 2015 · 4 comments · Fixed by #2499

Comments

@jyasskin
Copy link
Contributor

Forked from https://github.com/w3c/respec/pull/373#discussion_r22060777. Link the [Constructor] extended attribute to <dfn title="InterfaceName" for="InterfaceName">, and give that the id InterfaceName-InterfaceName. I'd guess that [NamedConstructor=Name] should go to <dfn title="Name"> and have the id dom-Name, but @tabatkins may point out that Bikeshed does something different.

@tabatkins
Copy link

Not quite; you want to link it to <dfn title=Interface() for=Interface>. It's just a normal method, which happens to have the same name as the interface, is all. Named constructors are identical to constructors, except they have a different name.

The WHATWG standard for IDs suggests that it should be dom-Interface-Interface or dom-Interface-Name, same as any other method.

@marcoscaceres marcoscaceres changed the title Link Constructors in contiguous-IDL Link constructors in WebIDL Jun 4, 2017
@shubhshrma
Copy link
Contributor

shubhshrma commented Mar 1, 2018

@marcoscaceres what are starting steps with this in webidl.js? I'm trying to include this in my gsoc tasks list. Any starting points would be great.

@marcoscaceres
Copy link
Contributor

marcoscaceres commented Mar 2, 2018

@shubhshrma, basically, when we see a "constructor", it needs to create an entry in conf.definitionMap that can be linked to as: "InterfaceName.IntefaceName()", as described in https://github.com/w3c/respec/issues/394#issuecomment-71237207

You probably don't need to go into this level of detail in your proposal, just describe generally what needs to be fixed overall for WebIDL.

@marcoscaceres
Copy link
Contributor

Blocked on whatwg/webidl#636

We might be getting new syntax for this.

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

Successfully merging a pull request may close this issue.

4 participants