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

@michelle so, given #655 requiring use activation on .show(), you could still do:

```js
let pr = new PaymentRequest (/*...*/);
const updatePromise = fetchDisplayItemsAndTotal();

// later on...
button.onclick = async ev => {
  const response = await pr.show(updatePromise);
  try {
    // this shows the payment sheet in a loading
    // state.
    handlePayment(response);
  } catch (err) {
    handleError(err);
  }
};
```

Does that work? 

-- 
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-360027510

Received on Wednesday, 24 January 2018 05:46:23 UTC