Re: [browser-payment-api] Write-up proposal for shipping address fields (#6)

Checking for attributes isn't crude feature detection - it's most likely the best type of feature detection. By having an interface in the type system, you can interrogate the presence of attributes at run time. A dictionary returned by a method is indistinguishable from a JavaScript object (in our implementation it is simply a JavaScript object) and you can't infer anything from it.

So if we add new attributes in future and I want to be able to tell if my code is running in a browser that supports those new attributes then I need an interface to interrogate.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/issues/6#issuecomment-195554240

Received on Friday, 11 March 2016 21:12:10 UTC