ckknight / gorillascript

GorillaScript is a compile-to-JavaScript language designed to empower the user while attempting to prevent some common errors.
MIT License
300 stars 34 forks source link

Promise and EventListener ( progress/notify support in gorillascript promise ) #136

Open unc0 opened 11 years ago

unc0 commented 11 years ago

Take this code as an example. Sometimes the value we need to return from a promise is in an EventListener. I don't know how to wrap this IndexedDB request into promise in gorillascript. The vow promise library also use this progress/notify pattern to fill a promise from an EventListener. Maybe we should have these macro/functions in jsprelude?