dialogs.js
ASCII text
1
document.body.addEventListener('click', function (event) {
2
if (event.target.matches('dialog')) {
3
event.target.close();
4
}
5
});
6