Working with <dialog> elements? ๐ค
Don't use .close(), it ends the dialog immediately.
Use HTMLDialogElement.requestClose(), it fires a close event first, giving your app a chance to intercept it, useful for confirmation or animations.
Try now ๐
https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/requestClose