Patch cancel
event to refine bubbling information
#1220
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #1212, the
cancel
event bubbles onHTMLInputElement
, but it does not bubble onHTMLDialogElement
. It does not bubble onCloseWatcher
either but that's becauseCloseWatcher
is not part of a bubbling tree.Events extraction cannot automatically get this nuance, be it only because it only sees
HTMLElement
as target interface for the event, and notHTMLInputElement
andHTMLDialogElement
. In practice, it claims that the event bubbles, which is neither wrong nor right.This patch restricts the
cancel
entry in the HTML events extract to only targetHTMLInputElement
, in order to create the right bubbling entry. And it creates anothercancel
entry which does not bubble forHTMLDialogElement
andCloseWatcher
.With this patch (and the new version of Reffy), we should end up with the following entry in the consolidated
events.json
file, which captures the fact that:HTMLInputElement
HTMLDialogElement
CloseWatcher