This is clever, but how is it different from just calling setTimeout directly? It seems like it even introduces some extra overhead (since you creating a new Timer object, registering an event handler, having your event handler called, calling the original function).
Re: prevent stack overflow
This is clever, but how is it different from just calling setTimeout directly? It seems like it even introduces some extra overhead (since you creating a new Timer object, registering an event handler, having your event handler called, calling the original function).