Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentRequestEvent.idl

Issue 2510833002: PaymentApp: Add interfaces for PaymentRequestEvent. (Closed)
Patch Set: PaymentApp: Add interfaces for PaymentRequestEvent. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // https://w3c.github.io/webpayments-payment-apps-api/#idl-def-paymentrequesteve nt
6
7 [
8 RuntimeEnabled=PaymentApp,
9 Exposed=ServiceWorker
10 ] interface PaymentRequestEvent : ExtendableEvent {
11 readonly attribute PaymentAppRequestData data;
12 // The payment app api spec says that respondWith() should take a union
13 // type as follows:
14 // - respondWith((Promise<PaymentResponse> or PaymentResponse));
15 //
16 // But the web-idl spec says that Promise types are not distinguishable
17 // with any other type. Also, if we pass PaymentResponse to respondWith(),
18 // then it will just be cast to a promise immediately via Promise.resolve().
19 //
20 // We found existing case here:
21 // - https://github.com/w3c/ServiceWorker/issues/724
22 //
23 // So, we should just use Promise<PaymentResponse> instead of union type.
24 // Related spec bug:
25 // - https://github.com/w3c/webpayments-payment-apps-api/pull/71
26 void respondWith(Promise<PaymentResponse> response);
27 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698