-
Notifications
You must be signed in to change notification settings - Fork 163
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 dictionary values to default to undefined #983
Comments
If we attempted to tackle #905 this would fall out of that, no? |
I think this was also fixed by #1140 DefaultValue now includes
The conversion code from ES value to WebIDL dictionary will just function correctly in step 4.4.[1-2] at https://webidl.spec.whatwg.org/#es-dictionary |
Although we might have missed adding
under https://webidl.spec.whatwg.org/#ref-for-dfn-dictionary-member-default-value%E2%91%A4 |
https://github.com/plinss/widlparser does not seem to accept this syntax so I cannot use it in whatwg/html#7983. If the above issue gets fixed in Web IDL let's file an issue against widlparser and then afterwards we can simplify the HTML Standard a little bit for the (It also seems a little weird to both have |
I am writing spec text like this:
It would be nicer if I could write this:
The spec currently does talk about undefined constant values. But I think that's separate from the values that are allowed as dictionary defaults, which are specified in https://heycam.github.io/webidl/#idl-dictionaries in the section starting
It looks like dictionary defaults are specified in terms of optional argument defaults, which are specified in terms of constants. So the most natural way to make this work is to thread through discussion of undefined constants there, plus grammar updates. We'd have to either say that constant types can be "primitive types or undefined", or we'd have to add undefined to the list of primitive types. Hmm...
The text was updated successfully, but these errors were encountered: