Re: [w3c/payment-handler] Suggest changing a shape of openWindow() (#300)

> Just looked the service worker interfaces a little bit more, it looks we can get the service worker from the opened window through "ServiceWorkerContainer.getRegistration(scope).then(function(ServiceWorkerRegistration) { ServiceWorkerRegistration.active })"
or
"ServiceWorkerContainer.getRegistrations()"

@gogerald, Thank you for your comment.
Yeah, it works. But I wanted that the opened window is not exposed as WindowClient.
For example, after finding WindowClient for the opened window using `clients.matchAll()`, calling `windowClient.focus()` is not clear what web-platform should do.

Okay, I don't want to be a blocker :) So, we can separate this issue from second issue.
I think we still need to resolve the second issue preferentially.

Do you agree with you for the following change (without data parameter)?

**Before**
```webidl
Promise<WindowClient> openWindow(USVString url);
```
**After**
```webidl
Promise<PaymentHandlerResponse> openWindow(USVString url);

partial interface Navigator {
  [SecureContext, SameObject] readonly attribute PaymentHandlerContainer paymentHandler;
};

[SecureContext, Exposed=Window]
interface PaymentHandlerContainer {
    void providerResponse(PaymentHandlerResponse response);
};
```


-- 
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/300#issuecomment-391049734

Received on Tuesday, 22 May 2018 16:12:30 UTC