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