Hacker News new | ask | show | jobs
by jacquesm 5673 days ago
By changing some global variable in the callback and checking if it has changed in 'somethinghappened' (which only gets called after 5 seconds, giving the callback time enough to get called).