- From: Jinho Bang <notifications@github.com>
- Date: Fri, 09 Jun 2017 12:35:15 -0700
- To: w3c/payment-handler <payment-handler@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/payment-handler/pull/174/review/43243487@github.com>
romandev 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>
@rsolomakhin,
In a case of SW, it will be script_url.
If the script_url is https://example.com/abcd/sw.js, then:
```
// SW context
clients.openWindow('/test1.html'); // https://example.com/test1.html
clients.openWindow('../test2.html'); // https://example.com/test2.html
clients.openWindow('./test3.html'); // https://example.com/abcd/test3.html
```
In a case of document, it will be document_url.
If the document_url is https://example.com/hello/world/test.html, then:
```
// Window global context
navigator.serviceWorker.register('/test1.js'); // https://example.com/test1.js
navigator.serviceWorker.register('../test2.js'); // https://example.com/hello/test2.js
navigator.serviceWorker.register('./test3.js'); // https://example.com/hello/world/test3.js
```
The existing SW APIs already uses the processing. [1][2]
[1] https://w3c.github.io/ServiceWorker/#clients-openwindow
[2] https://w3c.github.io/ServiceWorker/#navigator-service-worker-register
--
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_r121206507
Received on Friday, 9 June 2017 19:35:49 UTC