Skip to content
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

HTML: assert ErrorEventInit defaults #34297

Merged
merged 2 commits into from
Jun 7, 2022
Merged

HTML: assert ErrorEventInit defaults #34297

merged 2 commits into from
Jun 7, 2022

Conversation

annevk
Copy link
Member

@annevk annevk commented Jun 3, 2022

This accounts for the change in whatwg/html#7983 as well.

This accounts for the change in whatwg/html#7983 as well.
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might prefer adding a second test to the same file which just constructs const e = new ErrorEvent("error") directly, and tests that. This is pretty indirect and now we're mixing up two things (error event is normal, and error event defaults) into one test.

@annevk
Copy link
Member Author

annevk commented Jun 3, 2022

I can add that, but it seems we should keep this as well? We wouldn't want dispatch to change these fields.

@domenic
Copy link
Member

domenic commented Jun 3, 2022

I guess, but we've never worried about dispatch changing properties of event classes before. I don't object to keeping it but there's an unlimited number of wierd out-of-spec things a platform method call could do and I'm not sure how many of them we should test against.

@annevk
Copy link
Member Author

annevk commented Jun 7, 2022

I think we do in a large number of contexts, such as with shadow trees, a large number of UI events, etc. I agree that in this specific case it might be a little more undeserving, but it won't hurt.

@annevk annevk merged commit c297f88 into master Jun 7, 2022
@annevk annevk deleted the annevk/errorevent branch June 7, 2022 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants