]> git.ardis.lu - minimal-masonry/commitdiff
Simplify dialog close button main
authorArdis Lu <ardisglu@gmail.com>
Tue, 23 Jun 2026 05:04:43 +0000 (22:04 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 23 Jun 2026 05:04:43 +0000 (22:04 -0700)
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).

index.html

index a74bf56b76096c1703a83c25e3d9c7bb50acdd0e..5f55522cbeeb069d39909f5c671b14399b734cab 100644 (file)
     <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>
This page took 0.039878 seconds and 4 git commands to generate.