Files
sousa-gecko/testing/web-platform/tests/interfaces/web-based-payment-handler.idl
T
Stephen Chenney f6cd68d766 Bug 2018827 [wpt PR 57971] - Sync interfaces/ with @webref/idl 3.73.0, a=testonly
Automatic update from web-platform-tests
Sync interfaces/ with @webref/idl 3.73.0 (#57971)

* Sync interfaces/ with @webref/idl 3.73.0

* Update idl files by adding pointerevents and renaming web-based-payment
* Re-add 'uievents' to the idl_test dependencies
* Re-add 'uievents' to html/dom/idlharness.any.js
* Re-add 'uievents' to pointerlock idlharness.window.js
* Fix html/dom/idlharness.https.html

---------

Co-authored-by: wpt-pr-bot <wpt-pr-bot@users.noreply.github.com>
--

wpt-commits: 1c520bcb6d8d1d679da638a3042d47e1e4449265
wpt-pr: 57971
2026-02-26 15:20:03 +00:00

97 lines
3.1 KiB
Plaintext

// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: Web-based Payment Handler API (https://w3c.github.io/web-based-payment-handler/)
partial interface ServiceWorkerRegistration {
[SameObject] readonly attribute PaymentManager paymentManager;
};
[SecureContext, Exposed=(Window)]
interface PaymentManager {
attribute DOMString userHint;
Promise<undefined> enableDelegations(sequence<PaymentDelegation> delegations);
};
enum PaymentDelegation {
"shippingAddress",
"payerName",
"payerPhone",
"payerEmail"
};
partial interface ServiceWorkerGlobalScope {
attribute EventHandler oncanmakepayment;
};
[Exposed=ServiceWorker]
interface CanMakePaymentEvent : ExtendableEvent {
constructor(DOMString type);
undefined respondWith(Promise<boolean> canMakePaymentResponse);
};
partial interface ServiceWorkerGlobalScope {
attribute EventHandler onpaymentrequest;
};
dictionary PaymentRequestDetailsUpdate {
DOMString error;
PaymentCurrencyAmount total;
sequence<PaymentDetailsModifier> modifiers;
sequence<PaymentShippingOption> shippingOptions;
object paymentMethodErrors;
AddressErrors shippingAddressErrors;
};
[Exposed=ServiceWorker]
interface PaymentRequestEvent : ExtendableEvent {
constructor(DOMString type, optional PaymentRequestEventInit eventInitDict = {});
readonly attribute USVString topOrigin;
readonly attribute USVString paymentRequestOrigin;
readonly attribute DOMString paymentRequestId;
readonly attribute FrozenArray<PaymentMethodData> methodData;
readonly attribute object total;
readonly attribute FrozenArray<PaymentDetailsModifier> modifiers;
readonly attribute object? paymentOptions;
readonly attribute FrozenArray<PaymentShippingOption>? shippingOptions;
Promise<WindowClient?> openWindow(USVString url);
Promise<PaymentRequestDetailsUpdate?> changePaymentMethod(DOMString methodName, optional object? methodDetails = null);
Promise<PaymentRequestDetailsUpdate?> changeShippingAddress(optional AddressInit shippingAddress = {});
Promise<PaymentRequestDetailsUpdate?> changeShippingOption(DOMString shippingOption);
undefined respondWith(Promise<PaymentHandlerResponse> handlerResponsePromise);
};
dictionary PaymentRequestEventInit : ExtendableEventInit {
USVString topOrigin;
USVString paymentRequestOrigin;
DOMString paymentRequestId;
sequence<PaymentMethodData> methodData;
PaymentCurrencyAmount total;
sequence<PaymentDetailsModifier> modifiers;
PaymentOptions paymentOptions;
sequence<PaymentShippingOption> shippingOptions;
};
dictionary PaymentHandlerResponse {
DOMString methodName;
object details;
DOMString? payerName;
DOMString? payerEmail;
DOMString? payerPhone;
AddressInit shippingAddress;
DOMString? shippingOption;
};
dictionary AddressInit {
DOMString country = "";
sequence<DOMString> addressLine = [];
DOMString region = "";
DOMString city = "";
DOMString dependentLocality = "";
DOMString postalCode = "";
DOMString sortingCode = "";
DOMString organization = "";
DOMString recipient = "";
DOMString phone = "";
};