w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request/
Other
489 stars 135 forks source link

Sensible defaults for dictionary members #780

Closed marcoscaceres closed 5 years ago

marcoscaceres commented 5 years ago

As part of https://github.com/heycam/webidl/issues/76, we should give dictionary members that accept other dictionary members a default value. In most cases, we set the default to null and IDL conversion treats that as if an empty dictionary was passed "{}".

So, for example:

const dict = {};
response.retry(dict);

Would show up internally as if the following had been passed: { payer: {}, shippingAddress: {} }.