- From: Dave Longley <notifications@github.com>
- Date: Mon, 04 Dec 2017 15:36:55 +0000 (UTC)
- To: w3c/payment-handler <payment-handler@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 4 December 2017 15:37:20 UTC
@rsolomakhin, > The payment handler website may want to know whether the user granted the permission. ... Therefore, it may be more clear to rename .requestPermission() into .requestPermissionState(). Note that this query can already be done with [`navigator.permissions.query`](https://w3c.github.io/permissions/#dom-permissions-query), but the name of the permission will need to be passed. For example: ```js const result = await navigator.permissions.query({name: 'paymenthandler'}); // result.state is `granted`, `denied`, `prompt` ``` More examples here: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/permissions Using `requestPermission` mirrored the Notifications API, but I think `requestPermissionState` would be a new invention? I'm not sure if we need it in that case. -- 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/239#issuecomment-348998875
Received on Monday, 4 December 2017 15:37:20 UTC