TIL: Listen for JavaScript events only once!

from blog Good Enough, | ↗ original
A common thing I find myself doing in Javascript is adding some event driven behavior that I only want to happen once. Let’s say I have a big button that starts the process of lowering a certain spy into a pool of certain doom — I don’t want a second button press to awkwardly start him back at the top again! This usually means that I’m doing a...