- From: Andrea Giammarchi <notifications@github.com>
- Date: Tue, 31 Mar 2015 12:48:36 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Message-ID: <whatwg/fetch/issues/27/88225026@github.com>
@benjamingr sorry but to better explain myself, and thanking regardless @NekR for his contribution, that proposal implementation, the way I understand it, is as simple as this: ```js Promise.prototype.end = function () { // something impossible to implement in userland // that will automagically terminate whatever // execution state is inside the Promise function // so that everything in the function will be frozen // and threw away to grant the end of the Promise }; ``` Sure such sorcery might be implemented natively, but that means we missed a huge opportunity to make it right for both core/fetch/native and users defined APIs, 'cause as a user I need to drop timers/events/workers/anything asynchronous the moment that `.end()` is called, and unless that proposal implements mine too, providing a way to define the `onEnd` callback within the Promise function, there's not much users could do with such "standard". That plus the implicit `exit` behavior that does not fit with anything Promises, async, or await, related. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/27#issuecomment-88225026
Received on Tuesday, 31 March 2015 19:48:58 UTC