Skip to content

Commit

Permalink
Update interfaces/payment-handler.idl
Browse files Browse the repository at this point in the history
  • Loading branch information
autofoolip committed Sep 16, 2018
1 parent 5051858 commit 225089a
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 225089a

Please sign in to comment.