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

Set cancelable flag for "cancel" event (dialog and CloseWatcher) #1237

Merged
merged 1 commit into from
May 17, 2024

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented May 17, 2024

A recent HTML update changed the creation conditions for the "cancel" event for HTMLDialogElement and CloseWatcher:
https://github.com/whatwg/html/pull/10291/files

The extraction code no longer detects the cancelable flag as a result.

In any case, the code that amended the event to split HTMLElement into HTMLInputElement and HTMLDialogElement was incorrect: the cancelable flag ended up on HTMLInputElement whereas it should have been set on the other two target interfaces. The amendment is now explicit on both bubbles and cancelable to avoid any bad surprise.

One interesting aspect of the HTML update is that it seems to make the event cancelable depending on conditions. We cannot express that nuance with a boolean flag... I propose to set the flag to true.

A recent HTML update changed the creation conditions for the "cancel" event
for `HTMLDialogElement` and `CloseWatcher`:
https://github.com/whatwg/html/pull/10291/files

The extraction code no longer detects the `cancelable` flag as a result.

In any case, the code that amended the event to split `HTMLElement` into
`HTMLInputElement` and `HTMLDialogElement` was incorrect: the `cancelable` flag
ended up on `HTMLInputElement` whereas it should have been set on the other two
target interfaces.

One interesting aspect of the HTML update is that it seems to make the event
cancelable depending on conditions. We cannot express that nuance with a
boolean flag.
@tidoust tidoust merged commit b5e8ce5 into main May 17, 2024
1 check passed
@tidoust tidoust deleted the cancel-event branch May 17, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants