-
Couldn't load subscription status.
- Fork 41
Description
In the current Payment App Spec, user interaction is performed via a call to ServiceWorkerGlobalScope.clients.openWindow(). In @marcoscaceres' Payment Request Handler document, this is instead handled with a new openClientWindow() method on the PaymentRequestEvent.
There are pros and cons to each approach.
With ServiceWorkerGlobalScope.clients.openWindow(), we re-use the existing machinery and specification of Service Workers, albeit with a need to specify that the web browser make the determination that such a window is being opened in a web payment context and takes steps to render it sensible. This is not difficult, but it is implicit behavior.
With PaymentRequestEvent.openClientWindow(), the fact that this is a different kind of window altogether is clearer, and the binding between the window and its corresponding event is also clearer. On the downside, this approach requires us to respecify a substantial amount of existing handling -- further, by inventing a new affordance where an existing one seems to be adequate doesn't feel like it's very much in the spirit of the extensible web. (Some may recall that my original proposal included a separate mechanism for opening this window, but I decided that re-use was better than re-invention).
So, which approach do we want to use?