From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../tests/interfaces/payment-handler.idl | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 testing/web-platform/tests/interfaces/payment-handler.idl (limited to 'testing/web-platform/tests/interfaces/payment-handler.idl') 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 delete(DOMString instrumentKey); + Promise get(DOMString instrumentKey); + Promise> keys(); + Promise has(DOMString instrumentKey); + Promise set(DOMString instrumentKey, PaymentInstrument details); + Promise clear(); +}; + +dictionary PaymentInstrument { + required DOMString name; + sequence 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 canMakePaymentResponse); +}; + +partial interface ServiceWorkerGlobalScope { + attribute EventHandler onpaymentrequest; +}; + +dictionary PaymentRequestDetailsUpdate { + DOMString error; + PaymentCurrencyAmount total; + sequence 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 methodData; + readonly attribute object total; + readonly attribute FrozenArray modifiers; + Promise openWindow(USVString url); + Promise changePaymentMethod(DOMString methodName, optional object? methodDetails = null); + undefined respondWith(Promise handlerResponsePromise); +}; + +dictionary PaymentRequestEventInit : ExtendableEventInit { + USVString topOrigin; + USVString paymentRequestOrigin; + DOMString paymentRequestId; + sequence methodData; + PaymentCurrencyAmount total; + sequence modifiers; +}; + +dictionary PaymentHandlerResponse { +DOMString methodName; +object details; +}; -- cgit v1.2.3