You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #827 the idea came up that now that we have unions we could handle null in a generalized way. That is, rather than DOMString?, you would write (DOMString or null).
I like that this adds a lot of clarity with regards to the allowed values, but I do worry a bit about the verbosity. We might want to add a typedef for NullableDOMString or some such.
The text was updated successfully, but these errors were encountered:
I prefer having a shorthand. This is so common, both on the web platform and in programming languages in general, that removing the shorthand is not helpful.
We could define the shorthand as being equivalent to such a union, but even then, I'd prefer we advise people to never explicitly use the union, for consistency.
Right, although I'd phrase it as an operator precedence issue: [AllowShared] ArrayBuffer? is interpreted as ([AllowShared] ArrayBuffer)?, not [AllowShared] (ArrayBuffer?).
In #827 the idea came up that now that we have unions we could handle null in a generalized way. That is, rather than
DOMString?
, you would write(DOMString or null)
.I like that this adds a lot of clarity with regards to the allowed values, but I do worry a bit about the verbosity. We might want to add a typedef for
NullableDOMString
or some such.The text was updated successfully, but these errors were encountered: