A modal dialog you can open and close (via button, Esc, and click outside) without a single line of JS. ❤️ (currently Chrome 135 only)

edit: close button now uses command, too.

https://codepen.io/matuzo/pen/ByavVrq

Untitled

...

Introducing command and commandfor  |  Blog  |  Chrome for Developers

Learn about the new capabilities for declarative behavior on buttons.

Chrome for Developers
@matuzo @keithamus also just recently gave a talk about it at one of the @webstandards (#StoB makers) meetups: https://www.youtube.com/watch?v=svS_lf9AXkc
Everything you need to know about Invoker Commands - Keith Cirkel

YouTube