W3C home > Mailing lists > Public > public-payments-wg@w3.org > February 2016

Re: [webpayments] What is the appropriate conversational pattern for the API? (#55)

From: Dave Longley <notifications@github.com>
Date: Thu, 11 Feb 2016 20:02:44 -0800
To: w3c/webpayments <webpayments@noreply.github.com>
Message-ID: <w3c/webpayments/issues/55/183171788@github.com>
@rsolomakhin -- so that the implementations of those callbacks can run asynchronous code. For example, consider that the `getShippingOptions` function may need to make a call to the merchant site's server to retrieve the shipping options for a given shipping address. If the callback does not return a Promise, then this doesn't work. You could alternatively pass *another* callback function (node.js style for async programming) to the `getShippingOptions` function, but the preferred pattern on the Web is to use Promises.

Reply to this email directly or view it on GitHub:
Received on Friday, 12 February 2016 04:03:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:43:14 UTC