Re: [w3c/payment-handler] normative "A single payment handler should not be allowed to open more than one client window using this method." (#169)

> @romandev, this seems related to #163. It makes sense to move the constraint to the open window algorithm (and out of the Note). Thank you!

IMHO, the spec algorithm is already explaining the problem.

> If event.[[windowClient]] is not null, then:
> > If event.[[windowClient]].visibilityState is not "unloaded", reject promise with a DOMException whose name is "InvalidStateError" and abort these steps.

When openWindow is called at first time, the [[windowClient]] will be null. But when it is called at the next time, it will not be null and then if the windowClient is *not* unloaded, then, reject InvalidStateError.
In other words, if window is open, then reject promise with InvalidStateError.

But I think it's better to check it before navigation happens.

-- 
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/169#issuecomment-306559313

Received on Tuesday, 6 June 2017 17:30:09 UTC