Currently we don't prevent links for iterable<>, causing <dfn> for "iterable" does not exist warning.
But I haven't seen any spec that has a spec definition for iterable. What should be done?
cc: @marcoscaceres
mmm... I guess try to link, and if not in-document definition, link to WebIDL spec?
try to link, and if no in-document definition, link to WebIDL spec?
Introducing a feature that nobody would use feels like a non-starter... especially given that Bikeshed does not link iterable to anywhere and people are still happy.
Also I'm not sure what should be done here:
[Exposed=Window]
interface Foo {
attribute FrozenArray<DOMString> _iterable; // idl-foo-iterable
iterable<DOMString>; // idl-foo-iterable?
DOMString _stringifier(); // idl-foo-stringifier
stringifier; // idl-foo-stringifier?
};
I think nobody will do this but still it's a possible name collision. Maybe it can use ! like idl-foo!iterable as overloads currently do?
especially given that Bikeshed does not link iterable to anywhere and people are still happy.
I don't know if we can make that determination about happiness. I would certainly appreciate being able tot click on "stringifier" to actually read how it's implemented (either in the spec, or default behavior in IDL).
attribute FrozenArray<DOMString> _iterable; // idl-foo-iterable
Agree. Links to attribute.
iterable<DOMString>; // idl-foo-iterable?
I think here we actually should link to Web IDL. Is there any reason for a spec to override the definition of "iterable"?
(same comments for stringifier)
stringifier; // idl-foo-stringifier?
If I remember correctly, this means .toString() must be implemented for stringifier - So searching for "foo.toString()" in the spec might make sense... and if it's not there, fall back to WebIDL.
I can't remember if iterable puts any requirements on the defining spec.
and if it's not there, fall back to WebIDL.
I don't like the suggested fallbacking behavior, as it would make me assume there be a special definition within the spec. Clicking that and instead being redirected to a Web IDL spec is IMO a user experience nightmare 馃槬
I might be misunderstanding. Is it different to how we currently link to the IDL spec for DOMString?
AFAIK it does not fallback and always go IDL so I can always expect the same behavior. Fallbacking shows a link that may be linked to the current page or the IDL spec for the same IDL member.
AFAIK it does not fallback and always go IDL so I can always expect the same behavior.
Agree. yes.
Fallbacking shows a link that may be linked to the current page or the IDL spec for the same IDL member.
Yes, you are right. But the question is if the spec author is allowed to override or specify custom behavior. If yes, then it must be possible to link to the overridden behavior. But if not, then exclusively linking directly to IDL makes perfect sense (like with DOMString).
Hopefully I got that right? ... To be clear, I'm only suggesting we allow override is we absolutely need to - and if we don't, then we just point to the IDL spec.
(I trust your judgement tho! Please do whatever you think is best!!!!)
I would agree with the spec author point of view, but somehow disagree with the reader PoV. My preferred way:
attribute, getter etc. do not).The above sounds good. Let's go with it.
@marcoscaceres BTW do we have a list of specs that use ReSpec? I wonder what the actual specs do for iterable<> because the current setup will generate a warning if no corresponding dfn exists.
No list, unfortunately. But let's see I can do a quick search...
Thanks! But that text... is just a duplication from Web IDL. Hmm.
Lol, I didn鈥檛 actually click it. I鈥檒l see if I can another.
Most helpful comment
The above sounds good. Let's go with it.