- From: Rouslan Solomakhin <notifications@github.com>
- Date: Tue, 10 May 2016 09:31:25 -0700
- To: w3c/browser-payment-api <browser-payment-api@noreply.github.com>
- Cc:
Received on Tuesday, 10 May 2016 16:45:37 UTC
+1 to @adrianhopebailie on namespacing under `navigator.payments`. +1 and @adrianba to avoid factories. I would prefer something like this:
````javascript
var request = navigator.payments.request(supportedMethods, paymentDetails);
request.addEventListener("eventname", e => {/*....*/));
request.show().then(instrumentResponse => {/*....*/}).catch(error => {/*....*/});
````
Then we can place new methods (e.g., registration) under the `navigator.payments` method as well.
```javascript
navigator.payments.register(appData);
````
---
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/browser-payment-api/issues/16#issuecomment-218214401
Received on Tuesday, 10 May 2016 16:45:37 UTC