summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/payment-handler.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/interfaces/payment-handler.idl
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/interfaces/payment-handler.idl')
-rw-r--r--testing/web-platform/tests/interfaces/payment-handler.idl85
1 files changed, 85 insertions, 0 deletions
diff --git a/testing/web-platform/tests/interfaces/payment-handler.idl b/testing/web-platform/tests/interfaces/payment-handler.idl
new file mode 100644
index 0000000000..c76ef0983f
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/payment-handler.idl
@@ -0,0 +1,85 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Payment Handler API (https://w3c.github.io/payment-handler/)
+
+partial interface ServiceWorkerRegistration {
+ [SameObject] readonly attribute PaymentManager paymentManager;
+};
+
+[SecureContext, Exposed=(Window,Worker)]
+interface PaymentManager {
+ [SameObject] readonly attribute PaymentInstruments instruments;
+ attribute DOMString userHint;
+};
+
+[SecureContext, Exposed=(Window,Worker)]
+interface PaymentInstruments {
+ Promise<boolean> delete(DOMString instrumentKey);
+ Promise<any> get(DOMString instrumentKey);
+ Promise<sequence<DOMString>> keys();
+ Promise<boolean> has(DOMString instrumentKey);
+ Promise<undefined> set(DOMString instrumentKey, PaymentInstrument details);
+ Promise<undefined> clear();
+};
+
+dictionary PaymentInstrument {
+ required DOMString name;
+ sequence<ImageObject> icons;
+ DOMString method;
+};
+
+dictionary ImageObject {
+ required USVString src;
+ DOMString sizes;
+ DOMString type;
+};
+
+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;
+ object paymentMethodErrors;
+};
+
+[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;
+ Promise<WindowClient?> openWindow(USVString url);
+ Promise<PaymentRequestDetailsUpdate?> changePaymentMethod(DOMString methodName, optional object? methodDetails = null);
+ undefined respondWith(Promise<PaymentHandlerResponse> handlerResponsePromise);
+};
+
+dictionary PaymentRequestEventInit : ExtendableEventInit {
+ USVString topOrigin;
+ USVString paymentRequestOrigin;
+ DOMString paymentRequestId;
+ sequence<PaymentMethodData> methodData;
+ PaymentCurrencyAmount total;
+ sequence<PaymentDetailsModifier> modifiers;
+};
+
+dictionary PaymentHandlerResponse {
+DOMString methodName;
+object details;
+};