🔁 Reposted https://gomakethings.com/custom-events-with-vanilla-js/