justin․searls․co

TIL that inline JavaScript handlers…

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.


Got a taste for hot, fresh takes?

Then you're in luck, because you can subscribe to this site via RSS or Mastodon! And if that ain't enough, then sign up for my newsletter and I'll send you a usually-pretty-good essay once a month. I also have a solo podcast, because of course I do.