[w3c/payment-handler] PaymentManager behavior unclear (#253)

What happens if I do something like the following?

```js
const registration = await navigator.serviceWorker.register('/sw.js');

setInterval(() => {
  registration.paymentManager.userHint = Math.random().toString();
}, 1000);

setInterval(() => {
  registration.paymentManager.instruments.set(..., ...);
}, 1500);
```

That is, right now there are no restrictions on when the instruments collection and the user hints can be update. Note that since ServiceWorkerRegistration is exposed both inside and outside the service worker, the service worker itself can update these, e.g. in response to push notifications or fetch events.

Is that desired and expected? It seemed like from reading the document, the expectation was that these things would be set once, at registration time.

-- 
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-handler/issues/253

Received on Friday, 16 March 2018 02:31:22 UTC