From 45725d73bd5d479eabac8892c14c599a77bee5a6 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Sat, 15 Mar 2025 15:37:38 +0100 Subject: [PATCH 1/2] new dialog.requestClose() feature --- features/requestclose.yml | 6 ++++++ features/requestclose.yml.dist | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 features/requestclose.yml create mode 100644 features/requestclose.yml.dist diff --git a/features/requestclose.yml b/features/requestclose.yml new file mode 100644 index 00000000000..188de91958b --- /dev/null +++ b/features/requestclose.yml @@ -0,0 +1,6 @@ +name: dialog.requestClose() +description: The `requestClose()` method of a `` HTML element closes the dialog, firing a `close` event first, which listeners can use to prevent the dialog from closing. This differs from the `close()` method, which closes the dialog immediately. +spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-requestclose +group: html-elements +compat_features: + - api.HTMLDialogElement.requestClose diff --git a/features/requestclose.yml.dist b/features/requestclose.yml.dist new file mode 100644 index 00000000000..338a9e41de9 --- /dev/null +++ b/features/requestclose.yml.dist @@ -0,0 +1,11 @@ +# Generated from: requestclose.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: + chrome: "134" + chrome_android: "134" + edge: "134" +compat_features: + - api.HTMLDialogElement.requestClose From be8846fd534f04175655d26ae7e86c590a9bdf2a Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 20 Mar 2025 15:52:18 +0100 Subject: [PATCH 2/2] Addressed review comments --- features/requestclose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/requestclose.yml b/features/requestclose.yml index 188de91958b..86c86b11edf 100644 --- a/features/requestclose.yml +++ b/features/requestclose.yml @@ -1,5 +1,5 @@ name: dialog.requestClose() -description: The `requestClose()` method of a `` HTML element closes the dialog, firing a `close` event first, which listeners can use to prevent the dialog from closing. This differs from the `close()` method, which closes the dialog immediately. +description: The `requestClose()` method of a `` HTML element closes the dialog, firing a `cancel` event first, which listeners can use to prevent the dialog from closing. This differs from the `close()` method, which only fires the non-cancelable `close` event. spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-requestclose group: html-elements compat_features: