8000 PaymentRequestEvent.OpenWindow() could fail in two different ways · Issue #361 · w3c/payment-handler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaymentRequestEvent.OpenWindow() could fail in two different ways #361

Open
maxlgu opened this issue Jan 31, 2020 · 1 comment
Open

PaymentRequestEvent.OpenWindow() could fail in two different ways #361

maxlgu opened this issue Jan 31, 2020 · 1 comment

Comments

@maxlgu
Copy link
Contributor
maxlgu commented Jan 31, 2020

PaymentRequestEvent.OpenWindow(url) could fail in two different ways:

  • reject - for example, "If url is about:blank, return a Promise rejected with a TypeError."
  • resolve with null - for example, "If url's origin is not the same as the service worker's origin associated with the payment handler, return a Promise resolved with null."

What's the purpose of having two ways to refuse a failed "OpenWindow()". Can we merge them for developer ergonomics?

(link to the Chrome Implementation discussion: crbug.com/1046120)

@rsolomakhin
Copy link
Collaborator

@maxlgu - I would prefer that openWindow() reject in both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0