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

Allow linking to fully qualified method name #1024

Closed
alvestrand opened this issue Jan 10, 2017 · 6 comments
Closed

Allow linking to fully qualified method name #1024

alvestrand opened this issue Jan 10, 2017 · 6 comments
Labels

Comments

@alvestrand
Copy link

In this page:

https://github.com/w3c/respec/wiki/WebIDL-Guide

we see

Similarly, to define the Request.clone() method, you'd write <dfn>Request.clone</dfn>().

but later:

<p data-dfn-for="Request">
The <dfn data-lt="clone()">clone</dfn> method.
The <dfn>url</dfn> attribute.
</p>

Are the parentheses supposed to be inside or outside the <dfn> or the link, or doesn't it matter?

@alvestrand alvestrand changed the title Nit: parentheses in &lt;dfn&gt; ? Nit: parentheses in <dfn> ? Jan 10, 2017
@marcoscaceres
Copy link
Member

I literally just send a fix for this today 🎉 Let me fix the wiki.

@marcoscaceres
Copy link
Member

marcoscaceres commented Jan 10, 2017

@alvestrand, so, you can just do:

<section data-dfn-for="Foo" data-link-for="Foo">
 <pre>
   interface Foo{
     void clone();
   };
  </pre>
 <dfn>clone()</dfn>
 <p>The <a>clone()</a>...</p>
</section>

And it will work. I realized I didn't actually add support for <dfn>Request.clone</dfn>() but that's not a nice way of defining things regardless.

I'm going to get ReSpec to automatically add "data-link-for=" to <sections> that have a "data-dfn-for"... but in a few days from now. That will make the whole thing much much much nicer to work with.

@marcoscaceres
Copy link
Member

fixed idl above.

@marcoscaceres
Copy link
Member

marcoscaceres commented Jan 10, 2017 via email

@alvestrand
Copy link
Author

alvestrand commented Jan 10, 2017

Thanks - the question was whether <dfn>clone()<</dfn> works the same as <dfn>clone</dfn>() - the ambiguity still remains in the wiki.

I THINK the example with the parentheses outside is likely to be wrong, since there's only one of it and a dozen of the other, but I'd like to be sure.

WRT "what spec": I'm trying to fix errors in webrtc-stats - seems that dom has already fixed up webrtc-pc.
(in webrtc-stats, I'm quoting a piece of IDL from another spec; 4 out of 5 complaints are about that piece - I'd like to just say "this is IDL but don't bother linking it", but might resort to just putting dfns in the "defined elsewhere" section.)

@marcoscaceres
Copy link
Member

Thanks - the question was whether clone()< works the same as clone()

It should work the same. If not, that's a bug.

  • the ambiguity still remains in the wiki.

Actually, <dfn>Foo.bar()</dfn> doesn't work... fixing. What does work is just <dfn>foo()</dfn>

I THINK the example with the parentheses outside is likely to be wrong, since there's only one of it and a dozen of the other, but I'd like to be sure.

It's actually ok... it's for backwards compat.

@marcoscaceres marcoscaceres changed the title Nit: parentheses in <dfn> ? Allow linking to fully qualified method name Jan 16, 2017
marcoscaceres added a commit that referenced this issue Jan 16, 2017
* develop:
  v8.5.0
  fix(webidl-contiguous): allow linking to Parent.method() (fixes #1024) (#1040)
  feat: allow async functions for pre/postProc/afterAll (closes #1034) (#1038)
  chore(package): update karma to version 1.4.0 (#1037)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants