Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#17863 closed enhancement (duplicate)

make this.own() handle Promises

Reported by: bill Owned by:
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:


If this.own() is called with a Promise, it should cancel() the Promise when the widget is destroyed.

It should also forget about the Promise if/when the Promise is resolved or rejected. It should detect when the Promise is resolved/rejected by using Promise.then(), rather than using dojo/aspect.

Actually using always() would be slightly simpler than using then(), but always() doesn't seem to be supported by the Promise spec (see for example, so it's not very forward-compatible.

Change History (1)

comment:1 Changed 8 years ago by bill

Resolution: duplicate
Status: newclosed

Actually, this was already reported in #17680... but the fix there needs to be improved so that Destroyable forgets about the Promise when it's resolved or rejected.

Last edited 8 years ago by bill (previous) (diff)
Note: See TracTickets for help on using tickets.