At the moment it's not possible to cancel the callback invocation (using clearTimeout). Something like this would help a lot: <pre> // Return the wrapper function. wrapper.timeout_id = timeout_id; return wrapper; </pre>