- From: Rouslan Solomakhin <notifications@github.com>
- Date: Mon, 26 Jun 2017 06:08:39 -0700
- To: w3c/payment-handler <payment-handler@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 26 June 2017 13:09:19 UTC
rsolomakhin commented on this pull request.
> + </ol>
+ </li>
+ </ol>
+ </section>
+ <section id="abort-example" class="informative">
+ <h2>
+ Example of handling the <a>AbortPaymentEvent</a>
+ </h2>
+ <p>
+ This example shows how to write a service worker that listens to the
+ <a>AbortPaymentEvent</a>. When a <a>CanMakePaymentEvent</a> is
+ received, the service worker always returns true.
+ </p>
+ <pre class="example js" title="Handling the AbortPaymentEvent">
+ self.addEventListener('abortpayment', function(e) {
+ e.respondWith(true);
Good idea. The [PaymentRequest spec](https://w3c.github.io/browser-payment-api/) mentions timeouts. I've added similar text here.
Chrome will probably set the timeout period to 400ms, but the exact amount of time should be at implementer's discretion, in my opinion.
--
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/170#discussion_r124003926
Received on Monday, 26 June 2017 13:09:19 UTC