Using the Invoker Commands API aligns this button with the change made in
52bf07c95aa1ab46ca3505245a9e390498e184fd and makes the button more semantically correct (it is not submitting a dialog form, it is closing the dialog).
<h1>What is this?</h1>
<p>This website is a minimal reference implementation of the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Masonry_Layout">masonry layout</a>.</p>
<p><a href="https://github.com/ardislu/minimal-masonry">Click here</a> to view the source code on GitHub.</p>
- <form method="dialog">
- <button>OK</button>
- </form>
+ <button command="close" commandfor="info-dialog">OK</button>
</dialog>
<main></main>