Re: [w3c/payment-handler] Add ImageObject dictionary. (#174)

ianbjacobs commented on this pull request.



> @@ -695,6 +695,21 @@
             When called, this method executes the following steps:
           </p>
           <ol>
+            <li>If the <a data-lt="PaymentInstrument.icons">icons</a> member of
+            <var>details</var> is present, then for each <var>icon</var> in
+            <var>details</var>.<a data-lt="PaymentInstrument.icons">icons</a>:
+              <ol>
+                <li>If <var>icon</var>.<a data-lt="ImageObject.type">type</a>
+                is not a <a data-cite="#valid-mime-type">valid MIME type</a> or
+                the value of type is not a supported media format, then return
+                a <a>Promise</a> rejected with a <a>TypeError</a>.
+                </li>
+                <li>If <var>icon</var>.<a data-lt="ImageObject.sizes">sizes</a>
+                is not a <a data-lt="ImageObject.sizes">valid value</a>, then
+                return a <a>Promise</a> rejected with a <a>TypeError</a>.
+                </li>
+              </ol>
+            </li>

Thanks very much, @romandev. What do you think of adding those examples after the algorithm in the section "Convert image objects" to show how relative URL conversion would happen in different contexts?

In other words: the normative text may well suffice, but the examples could help explain expected behavior in different scenarios.

-- 
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-handler/pull/174#discussion_r121792365

Received on Tuesday, 13 June 2017 20:48:33 UTC