<dialog id="dialog">
<button type="button" id="close">Close</button>
<button type="button" id="close-w-value">Close w/ return value</button>
</dialog>
<button id="open">Open dialog</button>HTMLDialogElement: close() method / notebook
HTMLDialogElement: close() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.