Newly Available
HTML elements
id: requestclose
dialog.requestClose()
The
requestClose() method of a <dialog> 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.
Baseline Status:
Achieved Newly Available on May 27, 2025 across core engines.
Desktop Browser Engine Support
Google Chrome
134
Supported
Mozilla Firefox
139
Supported
Apple Safari
18.4
Supported
Microsoft Edge
134
Supported
Mobile Browser Engine Support
Chrome Android
134
Firefox Android
139
Safari iOS
18.4
Specifications and References
MDN Browser Compat Data Keys: