Skip to content

Commit

Permalink
Update interfaces/payment-handler.idl (#13015)
Browse files Browse the repository at this point in the history
  • Loading branch information
autofoolip authored and foolip committed Sep 17, 2018
1 parent 1aaada4 commit 2b12eb9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions interfaces/payment-handler.idl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ partial interface ServiceWorkerGlobalScope {
attribute EventHandler onpaymentrequest;
};

dictionary PaymentMethodChangeResponse {
DOMString error;
PaymentCurrencyAmount total;
FrozenArray<PaymentDetailsModifier> modifiers;
object paymentMethodErrors;
};

[Constructor(DOMString type, PaymentRequestEventInit eventInitDict), Exposed=ServiceWorker]
interface PaymentRequestEvent : ExtendableEvent {
readonly attribute USVString topOrigin;
Expand All @@ -68,7 +75,9 @@ interface PaymentRequestEvent : ExtendableEvent {
readonly attribute object total;
readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
readonly attribute DOMString instrumentKey;
readonly attribute boolean requestBillingAddress;
Promise<WindowClient?> openWindow(USVString url);
Promise<PaymentMethodChangeResponse?> changePaymentMethod(DOMString methodName, optional object? methodDetails = null);
void respondWith(Promise<PaymentHandlerResponse> handlerResponsePromise);
};

Expand Down

0 comments on commit 2b12eb9

Please sign in to comment.