- From: Andrea Giammarchi <notifications@github.com>
- Date: Mon, 30 Mar 2015 04:01:40 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Monday, 30 March 2015 11:02:14 UTC
as extra clarification, this is how you should write that ```js var p1 = new Promise(function (resolve, reject, ifCanceled) { var internal = setTimeout(resolve.bind(null, 123), 1000); ifCanceled(function () { clearInterval(interval); console.log('been cancelled'); }); }); ``` How else could you possibly cancel that promise that would like to resolve in a second? That's the way, if you want resolve to happen then don't setup cancel-ability through the `ifCanceled` mechanism. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/27#issuecomment-87635552
Received on Monday, 30 March 2015 11:02:14 UTC