-
Notifications
You must be signed in to change notification settings - Fork 165
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
Dictionary with required members as optional argument #1378
Comments
It seems like a more explicit definition would be good, but "an object with no properties" seems like the obvious default initialization for a dictionary parameter? |
This is a dupe of whatwg/dom#600. |
Hmm, I guess this is about the web-developer-facing interfaces, whereas whatwg/dom#600 is about the spec interface. But for the web developer-facing interface, this seems like a bug in the CSP spec, not the Web IDL spec. |
I think there's an IDL bug here that's wider than just events if |
What is the issue with the Web IDL Standard?
CSP has this IDL code (:
which IDL doesn't, as far as I can tell, expect or handle well.
If I'm not mistaken, when handling
new SecurityPolicyViolationEvent("type")
, the overload resolution algorithm just passes "that default value" in step 15.4.1, and nothing really defines what that value is ("which represents a default-initialized (as if from ES null or an object with no properties) dictionary value").The behavior of the constructor is specified in DOM, which doesn't pay attention to the requiredness of dictionary members.
It appears to me that as currently specified, the
required
tokens are essentially ignored when the argument is omitted. This seems unexpected at least.The text was updated successfully, but these errors were encountered: