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

Linkify "present" for dictionaries #513

Closed
domenic opened this issue Mar 23, 2017 · 5 comments
Closed

Linkify "present" for dictionaries #513

domenic opened this issue Mar 23, 2017 · 5 comments
Labels
clarification Standard could be clearer

Comments

@domenic
Copy link
Member

domenic commented Mar 23, 2017

Today I helped some people figure out a Chrome bug that was a result of not correctly using the C++ equivalent of "present" for dictionaries in our implementation of https://fetch.spec.whatwg.org/#dom-request . They weren't sure whether given { referrer: undefined }, if referrer was "present" or not. People didn't know that Web IDL was the place to look for what this means.

I think we should encourage more specs to link to https://heycam.github.io/webidl/#dfn-present as a way of helping with this. (Maybe via a public-script-coord announcement?) But to start Fetch could set an example.

@annevk
Copy link
Member

annevk commented Mar 23, 2017

I've been bitten a couple times by IDL refactoring removing things. How stable is this?

(Last time was that we added mapping for record and then we got rid of it in favor of Infra. Makes sense of course, but only found out about it due breakage.)

@domenic
Copy link
Member Author

domenic commented Mar 23, 2017

It should be quite stable. It's used all over the place, just without links to it.

@annevk
Copy link
Member

annevk commented Mar 23, 2017

I mean, I could imagine dictionaries becoming maps or using the "exists" language. But okay.

@domenic
Copy link
Member Author

domenic commented Mar 23, 2017

Oh, fair point. After thinking about that for a bit, I think we'll be safe, since the idea of "present" is a bit more complicated. Even if it is specifically defined to mean "when the underlying map entry exists", I think we'll still want to keep a specialized term for dictionaries since we want to talk about the interaction with undefined and default values and such. E.g. when people click on the "present" link it should go to something in Web IDL that talks about all those considerations, instead of going to somewhere in Infra that is much more abstract.

@annevk annevk added the clarification Standard could be clearer label Apr 11, 2018
@annevk
Copy link
Member

annevk commented Apr 11, 2018

Turns out that within a year we flipped on this a bit and exists is now the way to go: whatwg/webidl#524.

annevk added a commit that referenced this issue Aug 17, 2018
And linkify TypeError.

Fixes #513.
annevk added a commit that referenced this issue Aug 20, 2018
And linkify TypeError.

Fixes #513.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

No branches or pull requests

2 participants