-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
In some common cases, we expect a special state of promise, in which:
No handler is executed when the promise is fulfilled
Such case could be a not-wanted fetch process, like:
var fetching = fetch(url);
fetching.then(displayData);
// Since user navigates to another page, this fetch is not wanted anymore,
// however it could be continue and results in a local cache with the Expired header,
// so we do not abort it, and we do not want our reject handlers execute
page.on('exit', fetching.ignore);For similar case, we may:
- Add a
ignore()method to put a promise in a ignored state - Reuse the cancellation spec but allow consumer to specify wether to reject the promise
- Add a
detach(handler)method to detach a handler so that each consumer can only manage handlers from its own
or I may put the issue in wrong place?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels