{"action":"opened","issue":{"url":"https://api.github.com/repos/promises-aplus/cancellation-spec/issues/14","labels_url":"https://api.github.com/repos/promises-aplus/cancellation-spec/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/promises-aplus/cancellation-spec/issues/14/comments","events_url":"https://api.github.com/repos/promises-aplus/cancellation-spec/issues/14/events","html_url":"https://github.com/promises-aplus/cancellation-spec/issues/14","id":59205869,"number":14,"title":"Should we separate abort/cancel and ignore?","user":{"login":"otakustay","id":639549,"avatar_url":"https://avatars.githubusercontent.com/u/639549?v=3","gravatar_id":"","url":"https://api.github.com/users/otakustay","html_url":"https://github.com/otakustay","followers_url":"https://api.github.com/users/otakustay/followers","following_url":"https://api.github.com/users/otakustay/following{/other_user}","gists_url":"https://api.github.com/users/otakustay/gists{/gist_id}","starred_url":"https://api.github.com/users/otakustay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otakustay/subscriptions","organizations_url":"https://api.github.com/users/otakustay/orgs","repos_url":"https://api.github.com/users/otakustay/repos","events_url":"https://api.github.com/users/otakustay/events{/privacy}","received_events_url":"https://api.github.com/users/otakustay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-27T08:41:06Z","updated_at":"2015-02-27T08:41:06Z","closed_at":null,"body":"In some common cases, we expect a special state of promise, in which:\r\n\r\n> No handler is executed when the promise is fulfilled\r\n\r\nSuch case could be a not-wanted fetch process, like:\r\n\r\n```js\r\nvar fetching = fetch(url);\r\nfetching.then(displayData);\r\n\r\n// Since user navigates to another page, this fetch is not wanted anymore,\r\n// however it could be continue and results in a local cache with the Expired header,\r\n// so we do not abort it, and we do not want our reject handlers execute\r\npage.on('exit', fetching.ignore);\r\n```\r\n\r\nFor similar case, we may:\r\n\r\n1. Add a `ignore()` method to put a promise in a **ignored** state\r\n2. Reuse the cancellation spec but allow consumer to specify wether to reject the promise\r\n3. Add a `detach(handler)` method to detach a handler so that each consumer can only manage handlers from its own\r\n\r\nor I may put the issue in wrong place?"}}