🏠 New in Low Baseline Support: dialog.requestClose()
May 27, 2025
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.
Source features
api.HTMLDialogElement.requestClose[mdn]