You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 from show(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.
The text was updated successfully, but these errors were encountered:
Support for promises would allow better integration with frameworks and coding styles that make use of promises.
Requirements
show(options)
show(options, successCallback, errorCallback)
If this is the case, then we can return a promise from
show(options)
options.success(date)
.options.cancel()
should be supported also by resolving with undefined (no) argument. This behavioral difference must be well documented.options.error(err)
Promise
, this is a choice the app developer can make for himselfThis is open for anyone to pick up. Improvements to these requirements welcome too.
The text was updated successfully, but these errors were encountered: