Re: [w3c/payment-request] Add way to update `total` and `displayItems` after `.show()` but before user interaction (#645)

Something that could work:

```webidl
interface PaymentRequest { 
  Promise<PaymentResponse> showWithLoadingScreen(Promise<PaymentDetails>);
}
```

Example usage:

```javascript
const pr = new PaymentRequest(/* ... */);
if (pr.showWithLoadingScreen) {
  pr.showWithLoadingScreen(new Promise((resolve, reject) => {
    const updatedDetails = /* ... */;
    resolve(updatedDetails);
  }).then(handlePayment).catch(handleError);
} else {
  pr.show().then(handlePayment).catch(handleError);
}
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/645#issuecomment-342381580

Received on Tuesday, 7 November 2017 05:43:13 UTC