blob: 9f08ffdabcc0f61b6b3c9641c0a02ceec61d4e92 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/payment-handler/#the-canmakepaymentevent
[
RuntimeEnabled=PaymentApp,
Exposed=ServiceWorker
] interface CanMakePaymentEvent : ExtendableEvent {
constructor(DOMString type, CanMakePaymentEventInit eventInitDict);
readonly attribute USVString topOrigin;
readonly attribute USVString paymentRequestOrigin;
readonly attribute FrozenArray<PaymentMethodData> methodData;
readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
[CallWith=ScriptState, RaisesException] void respondWith(Promise<boolean> canMakePaymentResponse);
// https://gist.github.com/rsolomakhin/eba91c185028899883d2c7f37f357d7c
[RuntimeEnabled=PaymentHandlerMinimalUI] readonly attribute DOMString currency;
[RuntimeEnabled=PaymentHandlerMinimalUI, CallWith=ScriptState, RaisesException] void respondWithMinimalUI(Promise<CanMakePaymentResponse> response);
};