It's what I said there: "I was not proposing 1 [service worker] per origin. What I was trying to say is, you can register as many service workers as you like, but the "feature" is controlled per origin (like any other powerful feature)."
Again, in pictures, I want this on "bank.com":
![screenshot 2017-01-25 15 15 36](https://cloud.githubusercontent.com/assets/870154/22277634/363917ba-e311-11e6-9258-a96f3b497995.png)
And I want this on "merchant.com" when I go to pay:
![screenshot 2017-01-25 11 15 23](https://cloud.githubusercontent.com/assets/870154/22272667/9cf63c20-e2ef-11e6-9655-823594e7bd13.png)
And this is what is "totally bogus" (apologies if I misread and you were not proposing the below):
```JS
const reg1 = await serviceWorker.register("app1.sw");
const reg2 = await serviceWorker.register("app2.sw");
reg1.paymentManager.setName("SUPER COOL CARD MANAGER");
reg1.paymentManager.setIcon("super-app1.png");
reg2.paymentManager.setName("I'M A TOTALLY DIFFERENT CARD MANAGER");
reg2.paymentManager.setIcon("TOTALY_DIFFERENT_APP.jpeg");
await Promise.all([reg1.paymentManager.register(), reg2.paymentManager.register()];
```
Which is why the manifest (or HTML things) should set the name and the icon of the web application.
Also, calling reg1's `.register()` should grant permission to reg2, because ".register()" is a permission grant. I think you agree with that, no?
--
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/webpayments-payment-apps-api/issues/95#issuecomment-275016740