whatwg / webidl

Web IDL Standard
https://webidl.spec.whatwg.org/
Other
405 stars 162 forks source link

Can a required argument exist after an optional argument? #1214

Open saschanaz opened 2 years ago

saschanaz commented 2 years ago

Long time ago there was this restriction added in 2011:

https://github.com/whatwg/webidl/blob/3785917267f93fa898ee29c3dc1b2239a720565d/Overview.xml#L1391-L1396

This was lifted in 2013 by 97499d48855a9f9012fe145d49b83ccd71d1738b, but I don't think it was well advertised and at least one parser still disallows this: https://github.com/whatwg/webidl/pull/1211#issuecomment-1273170408

I think we need to double check and add an explicit phrase about whether this is allowed or disallowed.

domenic commented 2 years ago

Thanks for the detective work!

I'm not sure we need an explicit phrase; it seems like we just need to fix buggy parsers. But maybe a note would be helpful, indeed.