// '#dialog-unique' is a <dialog>..</dialog> element.
// By default, <dialog> elements are initially hidden
const dialogElement = document.getElementById('dialog-unique');
// initializeDialog enhances dialogElement so that a click outside the dialog window
// closes the modal
initializeDialog(dialogElement);
// dialogElement can then be shown with its showModal() method
dialogElement.showModal();