Simple JavaScript mechanism to coordinate one-time events across modules