Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    using Promise in RPC functions' callbacks

    Hi,

    Most or even all functions used for RPC currently return void.

    On browsers that support Promise (or can have it polyfilled), you could return Promise if the callback parameter is empty.
    It should be backwards compatible, but could give new possibilities.

    For example for DataSource.fetchData(data, null, requestOptions) returned Promise would resolve to object {dsRequest: {...}, data: {...}, dsRequest: {...}}.
    We could even use async function to have the code even simpler.

    I am now experimenting with wrappers like fetchDataPromise(data, requestProperties) and so far have good results.

    Best regards,
    Janusz


    "originally posted by Janusz "

    #2
    We do plan to add this support, but it’s not currently scheduled for any particular release. It is a valid Feature Sponsorship if anyone wants it sooner.

    Comment

    Working...
    X