[w3c/browser-payment-api] There might be a conflict between 'shippingType' in PaymentOptions and WebIDL binding. (#271)

In the current spec, 'shippingType' in PaymentOptions is defined as enum PaymentShippingType.

BTW, According to PaymentRequest constructor algorithm 22[1], if options.shippingType is not a valid PaymentShippingType value then set the shippingType attribute on request to 'shipping'.

On the other hand, according to webidl spec[2], it causes a TypeError if passing a invalid enum value as operation argument. It means that the constructor can stop due to a exception that occured in binding side.

In other words, the former is conflicting with the latter. (But I'm not sure..)
IMHO, if the shippingType changes into DOMString, this issue might be resolved.

What do you think?

[1] https://w3c.github.io/browser-payment-api/#h-note5
[2] http://heycam.github.io/webidl/#example-363ff014

-- 
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/271

Received on Sunday, 18 September 2016 14:53:56 UTC