-
Notifications
You must be signed in to change notification settings - Fork 78
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
Problem with SecurityPolicyViolationEvent constructor and optional init dict #631
Comments
I don't have much of an opinion here, and I expect the constructor's usage is low enough to allow ~any approach. What outcome would you prefer? |
I'd suggest we drop |
I'm fine with dropping it. I think that means we should simply define default values for those |
Seems fine to me. |
And |
@SaeidEid wanted to grab this as well, and it should be a very straightforward change to the spec and test. |
Sounds good to me. |
I create an issue for this in chromium: https://issues.chromium.org/issues/325291983 |
Just wanted to notice that Gecko seems to set |
See whatwg/webidl#1378 for a description of this issue.
TLDR: Having an optional eventInitDict parameter in the
SecurityPolicyViolationEvent
constructor doesn't really make sense, considering that dictonarySecurityPolicyViolationEventInit
hasrequired
properties.After adjusting Gecko to follow the spec to the letter,
new SecurityPolicyViolationEvent("securitypolicyviolation")
fails, which currently works on all browsers and is tested by https://wpt.fyi/results/content-security-policy/securitypolicyviolation/idlharness.window.html.This worked in Gecko before, because we didn't make any of the properties
required
and seemingly in Chrome because it has a second non-standard constructor with just one argument.Either all browsers should align with spec or the spec needs to be updated to match.
The text was updated successfully, but these errors were encountered: