You need to return that because .showModal()
returns a promise:
return document.body.appendChild(dialog).showModal();
You need to return that because .showModal()
returns a promise:
return document.body.appendChild(dialog).showModal();