-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Support for promises would allow better integration with frameworks and coding styles that make use of promises.
Requirements
- Don't break the current API
- 0 (zero) callback handlers should be registered in both:
show(options)show(options, successCallback, errorCallback)
If this is the case, then we can return a promise fromshow(options)
- promise resolve is same as
options.success(date).options.cancel()should be supported also by resolving with undefined (no) argument. This behavioral difference must be well documented. - promise reject is same as
options.error(err) - the implementation should be seamless and not break current behavior (when no promise support f.ex. is available or when callbacks are supplied).
- the plugin will not include a polyfill for
Promise, this is a choice the app developer can make for himself - ECMA5 compatibility
This is open for anyone to pick up. Improvements to these requirements welcome too.
leMaik