Justin Searls
- 3mo ·
-
Public·
-
mastodon.social
TIL that inline JavaScript handlers actually define an `event` variable for you:
This actually works:
〈a onclick="event.preventDefault(); this.closest('dialog').close()"〉
Maybe everyone else knew this, but it took me over 25 years apparently.