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

DOM Events Test Suite Coverage #33125

Open
Gabisampaio opened this issue Mar 9, 2022 · 0 comments
Open

DOM Events Test Suite Coverage #33125

Gabisampaio opened this issue Mar 9, 2022 · 0 comments

Comments

@Gabisampaio
Copy link
Contributor

I measured the coverage of the DOM Events test suite against the standard and there seems to be a few coverage gaps. I list three scenarios below:

Scenario 1: Dispatch with optional flags

There seems to be no test calling the dispatchEvent function with the optional flags legacyTargetOverride and legacyOutputDidListenersThrow.
Additional test: calling dispatchEvent with optional flags activated and check whether handler is still triggered.

Scenario 2: Activation behaviour

Another potential scenario to cover is activation behaviour, which is triggered, for instance, if we call dispatchEvent on an element of type input.

Additional test: one could check if certain properties hold for the dispatch triggering activation behaviour, such as the event phase is set to NONE during the execution of a handler.

Scenario 3: Slottable feature

It could be interesting to write tests using the HTMLSlotElement.

Additional test: one could perhaps test if creating a slot on an input element and dispatching an event on the input element by calling dispatchEvent would trigger activation behaviour.

I appreciate any feedback regarding these scenarios. If necessary, I can submit additional tests via pull requests to improve the test suite coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@gsnedders @Gabisampaio and others