Skip to content

HTML: assert ErrorEventInit defaults - #34297

Merged
annevk merged 2 commits into
masterfrom
annevk/errorevent
Jun 7, 2022
Merged

annevk merged 2 commits into
masterfrom
annevk/errorevent

Conversation

@annevk

@annevk annevk commented Jun 3, 2022

Copy link
Copy Markdown
Member

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

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

@domenic domenic left a comment

Copy link
Copy Markdown
Member

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

annevk commented Jun 3, 2022

Copy link
Copy Markdown
Member Author

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

@domenic

domenic commented Jun 3, 2022

Copy link
Copy Markdown
Member

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

annevk commented Jun 7, 2022

Copy link
Copy Markdown
Member Author

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