Re: [w3c/payment-request] WIP - very rough sketch of requestShippingAddress() method (#873)

marcoscaceres commented on this pull request.



> @@ -3985,6 +4071,39 @@ <h3>
             </li>
           </ol>
         </section>
+        <section>
+          <h2>
+            <dfn data-lt="requestShippingAddress(addressParts)">requestShippingAddress()</dfn> method
+          </h2>
+          <aside class="note">
+            <p>
+              If a developer wants to incrementally request more granular details
+              of the user's shipping address, for example, to re-calculate
+              shipping cost, then they can call <a>requestShippingAddress()</a>
+              and provide a list of <a>AddressParts</a>, which will return a

```suggestion
              and provide a sequence of <a>AddressParts</a>, which will return a
```

> @@ -3955,6 +4040,7 @@ <h2>
         <pre class="idl">
           [Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict), SecureContext, Exposed=Window]
           interface PaymentRequestUpdateEvent : Event {
+            Promise&lt;PaymentAddress&gt; requestShippingAddress(AddressParts addressParts);

```suggestion
            Promise&lt;PaymentAddress&gt; requestShippingAddress(sequence<AddressParts> addressParts);
```

> @@ -3955,6 +4040,7 @@ <h2>
         <pre class="idl">
           [Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict), SecureContext, Exposed=Window]
           interface PaymentRequestUpdateEvent : Event {
+            Promise&lt;PaymentAddress&gt; requestShippingAddress(AddressParts addressParts);

Note that here it should take a sequence... FrozenArrays are returned by methods, but generally not passed into a method call.  Will add a suggestion. 

-- 
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/pull/873#pullrequestreview-256629343

Received on Tuesday, 2 July 2019 01:40:34 UTC