Proposal: Allow Promise callbacks to be removed
Oliver Dunk
oliver at oliverdunk.com
Tue Apr 24 10:06:50 UTC 2018
Based on feedback, I agree that a blanket `Promise.prototype.clear()` is a bad idea. I don’t think that is worth pursuing.
I still think that there is value in this, especially the adding and removing of listeners you have reference to as Andrea’s PoC shows. Listeners would prevent the chaining issue or alternatively I think it would definitely be possible to decide on intuitive behaviour with the clear mechanic. The benefit of `clear(reference)` over listeners is that it adds less to the semantics.
I think the proposed userland solutions are bigger than I would want for something that I believe should be available by default, but I respect that a lot of the people in this conversation are in a better position to make a judgement about that than me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180424/9d4aaf75/attachment.html>
More information about the es-discuss
mailing list