From 220eedda07fd8e77f5a1354406b5c16b30239414 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=
+ An object or dictionary generated by a payment
+ method that a merchant can use to process or validate a
+ transaction (depending on the payment method).
+
+ The payment method identifier for the payment method
+ that triggered the event.
+
+
+ The payment option changed algorithm runs when the user
+ chooses a new payment method. It MUST run the following steps:
+
The user chooses a new shipping option.
+
+
+ paymentmethodchanged
+
+
+ PaymentRequestUpdateEvent
+
+
+ ...
+
+
[Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict), SecureContext, Exposed=Window]
interface PaymentRequestUpdateEvent : Event {
+ readonly attribute DOMString methodName;
+ readonly attribute object? details;
void updateWith(Promise<PaymentDetailsUpdate> detailsPromise);
};
@@ -3442,6 +3455,26 @@
+ details member
+
+
+ methodName member
+
+
updateWith() method
@@ -3566,15 +3599,48 @@
update is currently in progress.
+
+
+
+ [[\details]]
+
+
+ An object or dictionary.
+
+
+
+ [[\methodName]]
+
+
+ A payment method identifier.
+
+
PaymentRequestUpdateEventInit dictionary
- dictionary PaymentRequestUpdateEventInit : EventInit {};
+ dictionary PaymentRequestUpdateEventInit : EventInit {
+ object? details;
+ DOMString methodName;
+ };
+
+
+
+ Payment option changed algorithm
+
+
+
+
+
+
type
attribute to name.
An object or
The payment method identifier for the payment method @@ -3741,10 +3741,9 @@
The payment option changed algorithm runs when the user - chooses a new payment method. It MUST run the following steps: + selects a new payment method. It MUST run the following steps:
type
attribute to name.
+ A PaymentRequest's onpaymentmethodchanged attribute is + an EventHandler for a PaymentRequestUpdateEvent named + "paymentmethodchanged". +
+paymentmethodchanged
- An object or dictionary generated by a payment - method that a merchant can use to process or validate a - transaction (depending on the payment method). + When getting, return the value of the [[\methodDetails]] + internal slot.
- The payment method identifier for the payment method - that triggered the event. + When getting, returns the value of the [[\methodName]] + internal slot.
+ Null, or an object or + dictionary + generated by a payment handler. When not null, it + provides payment handler specific data to assist a + merchant to handle the event. +
++ For example, a "paymentmethodchanged" event might + include some details about the newly selected payment + method to allow the merchant to recalculate costs if + needed. +
dictionary PaymentRequestUpdateEventInit : EventInit { - object? details; + object? methodDetails; DOMString methodName; };
- The payment option changed algorithm runs when the user + The payment method changed algorithm runs when the user selects a new payment method. It MUST run the following steps:
type
attribute to name.
+ When getting, return the value of the [[\methodDetails]] + internal slot. +
++ When getting, returns the value of the [[\methodName]] + internal slot. +
++ Null, or an object or + dictionary generated + by a payment handler. When not null, it provides + payment handler specific data. +
+[Constructor(DOMString type, optional PaymentRequestUpdateEventInit eventInitDict), SecureContext, Exposed=Window] interface PaymentRequestUpdateEvent : Event { - readonly attribute DOMString methodName; - readonly attribute object? methodDetails; void updateWith(Promise<PaymentDetailsUpdate> detailsPromise); };@@ -3465,24 +3511,6 @@
- When getting, return the value of the [[\methodDetails]] - internal slot. -
-- When getting, returns the value of the [[\methodName]] - internal slot. -
-- Null, or an object or - dictionary - generated by a payment handler. When not null, it - provides payment handler specific data to assist a - merchant to handle the event. -
-- For example, a "paymentmethodchanged" event might - include some details about the newly selected payment - method to allow the merchant to recalculate costs if - needed. -
-- dictionary PaymentRequestUpdateEventInit : EventInit { - object? methodDetails; - DOMString methodName; - }; + dictionary PaymentRequestUpdateEventInit : EventInit {};-
type
attribute to name.
This API also enables web sites to take advantage of more secure @@ -1021,8 +1034,8 @@
- The payment method changed algorithm runs when the user - selects a new payment method. It MUST run the following steps: + The user agent MUST run the payment method changed + algorithm runs when the user changes payment method. The + algorithm takes methodDetails, which is either + dictionary or an + object or null, a DOMString + methodName, which represents the payment method + identifier of the payment handler the user is interacting + with:
- A PaymentRequest's onpaymentmethodchanged attribute is + A PaymentRequest's onpaymentmethodchange attribute is an EventHandler for a PaymentRequestUpdateEvent named - "paymentmethodchanged". + "paymentmethodchange".
paymentmethodchanged
+ paymentmethodchange
@@ -3741,6 +3753,12 @@
id
string of the
@@ -3762,15 +3780,16 @@ - When getting, return the value of the [[\methodDetails]] +
+ When getting, returns the value of the [[\methodDetails]] internal slot.
@@ -895,7 +895,7 @@+
When getting, returns the value of the [[\methodName]] internal slot.
@@ -1338,7 +1338,7 @@+
A PaymentRequest's onpaymentmethodchange attribute is
an EventHandler for a PaymentRequestUpdateEvent named
"paymentmethodchange".
From aa7f155b38c57d8c05781859bbd4f75354959925 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=
From 68217a3d57f8489fdcc8aec11f50b20e4ac698ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=
dictionary of [[payment-method-basic-card]].
- When getting, returns the value of the [[\methodDetails]] - internal slot. -
-- When getting, returns the value of the [[\methodName]] - internal slot. -
-- Null, or an object or - dictionary generated - by a payment handler. When not null, it provides - payment handler specific data. -
-paymentmethodchange
+ [Constructor(DOMString type, optional PaymentMethodChangeEventInit eventInitDict), SecureContext, Exposed=Window] + PaymentMethodChangeEvent : PaymentRequestUpdateEvent { + readonly attribute DOMString methodName; + readonly attribute object? methodDetails; + } ++
+ When getting, returns the value of the [[\methodDetails]] + internal slot. +
++ When getting, returns the value of the [[\methodName]] + internal slot. +
++ Instances of PaymentMethodChangeEvent are created with the + internal slots in the following table: +
++ Internal Slot + | ++ Description (non-normative) + | +
---|---|
+ [[\methodDetails]] + | +
+ + Null, or an object or + dictionary + generated by a payment handler. When not null, it + provides payment handler specific data. + + |
+
+ [[\methodName]] + | ++ Null, or a DOMString representing the payment method + identifier for the payment method that the user last + interacted with. + | +
+ dictionary PaymentMethodChangeEventInit : PaymentRequestUpdateEventInit { + DOMString methodName; + object? methodDetails; + }; ++
@@ -3745,10 +3772,6 @@
id
string of the
@@ -3784,14 +3807,22 @@ [Constructor(DOMString type, optional PaymentMethodChangeEventInit eventInitDict), SecureContext, Exposed=Window] - PaymentMethodChangeEvent : PaymentRequestUpdateEvent { + interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent { readonly attribute DOMString methodName; readonly attribute object? methodDetails; - } + };
dictionary PaymentMethodChangeEventInit : PaymentRequestUpdateEventInit { - DOMString methodName; + required DOMString methodName; object? methodDetails; };+
The user agent MUST run the payment method changed - algorithm runs when the user changes payment method. The + algorithm when the user changes payment method. The algorithm takes methodDetails, which is either dictionary or an object or null, and a @@ -3833,12 +3833,12 @@
- When getting, returns the value of the [[\methodDetails]] - internal slot. +
+ When getting, returns the value it was initialized with. See + methodDetails member for more information.
- When getting, returns the value of the [[\methodName]] - internal slot. -
-- Instances of PaymentMethodChangeEvent are created with the - internal slots in the following table: +
+ When getting, returns the value it was initialized with. See + methodName member for more information.
-- Internal Slot - | -- Description (non-normative) - | -
---|---|
- [[\methodDetails]] - | -
- - Null, or an object or - dictionary - generated by a payment handler. When not null, it - provides payment handler specific data. - - |
-
- [[\methodName]] - | -- A DOMString representing the payment method identifier - for the payment method that caused the event to fire. - | -
- The user agent MUST run the payment method changed - algorithm when the user changes payment method. The - algorithm takes methodDetails, which is either - dictionary or an - object or null, and a - methodName, which is a DOMString that represents the - payment method identifier of the payment handler the - user is interacting with: + A payment handler MAY run the payment method changed + algorithm when the user changes payment method with + methodDetails, which is either dictionary or an object or null, and a methodName, + which is a DOMString that represents the payment method + identifier of the payment handler the user is interacting + with:
When getting, returns the value it was initialized with. See - methodDetails member for more information. + methodDetails member of PaymentMethodChangeEventInit + for more information.
When getting, returns the value it was initialized with. See - methodName member for more information. + methodName member of PaymentMethodChangeEventInit for + more information.