mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
1537e9d304
1. Add "optional Promise<PaymentDetailsUpdate> detailsPromise" as a parameter of PaymentRequest.show() in PaymentRequest.webidl. 2. Let PaymentRequest inherit from PromiseNativeHandler, and implement the ResolvedCallback() and RejectedCallback() to handle the PaymentDetailsUpdate promise. 3. Update PaymentRequest.show() implementation. If PaymentDetailsUpdate Promise is not nullptr, the show request would not be transferred to chrome process immediately until the promise is resolved/rejected. 4. Update selectedShippingOption when requestShipping is true. 5. Change the PaymentMethod id validation sequence according to the spec. --HG-- extra : histedit_source : e591c759037cce4f66701b2faa5ecbe01c00e246
21 lines
755 B
Plaintext
21 lines
755 B
Plaintext
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* The origin of this WebIDL file is
|
|
* https://www.w3.org/TR/payment-request/#paymentrequestupdateevent-interface
|
|
*/
|
|
|
|
[Constructor(DOMString type,
|
|
optional PaymentRequestUpdateEventInit eventInitDict),
|
|
SecureContext,
|
|
Func="mozilla::dom::PaymentRequest::PrefEnabled"]
|
|
interface PaymentRequestUpdateEvent : Event {
|
|
[Throws]
|
|
void updateWith(Promise<PaymentDetailsUpdate> detailsPromise);
|
|
};
|
|
|
|
dictionary PaymentRequestUpdateEventInit : EventInit {
|
|
};
|