Re: [w3c/payment-request] To address branded button issues and improve privacy, add browser support for payment method selection before the sheet (#777)

What if we proposed some declarative way of binding a payment request to DOM elements?
Something like:

```
<img src="./card-logo.png" id="card_button" onclick="myPaymentRequest.show()" />
<img src="./gpay-logo.png" id="gpay_button" onclick="myPaymentRequest.show()" />
<script>
var myPaymentRequest = new PaymentRequest(...)
myPaymentRequest.applyClass('visible', 'basic-card', getElementById('card_button'))
myPaymentRequest.applyClass('visible', 'http://google.com/pay', getElementById('gpay_button'))
</script>
```

Is there a safe way to do this without the user being able to figure out the supported methods? Could the CSS class be applied but not reported?

-- 
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-request/issues/777#issuecomment-426065847

Received on Monday, 1 October 2018 21:16:59 UTC