非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
PaymentRequestEvent
构造函数创建新
PaymentRequestEvent
object which is a constructor for a
PaymentRequestEvent
which is the object passed to a payment handler when a
PaymentRequest
is made..
var paymentRequestEvent = new PaymentRequestEventy(type, options)
'PaymentRequest'
.
instrumentKey
: A
PaymentInstrument
object reflecting the payment instrument selected by the user or an empty string if the user has not registered or chosen a payment instrument.
methodData
: An array of
PaymentMethodData
objects containing payment method identifers for the payment methods that the web site accepts and any associated payment method specific data.
modifiers
: An array of objects containing changes to payment details.
paymentRequestId
: The ID of the
PaymentRequest
对象。
paymentRequestOrigin
: The origin where the
PaymentRequest
object was initialized.
topLeveOrigin
: The top-level origin where the
PaymentRequest
object was initialized.
total
: The total amount being requested for payment.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
PaymentRequestEvent()
构造函数
|
Chrome
57
Disabled
|
Edge
≤79
Disabled
|
Firefox No | IE ? | Opera No | Safari ? | WebView Android No |
Chrome Android
57
Disabled
|
Firefox Android No | Opera Android No | Safari iOS ? | Samsung Internet Android No |
完整支持
不支持
兼容性未知
实验。期望将来行为有所改变。
用户必须明确启用此特征。
PaymentRequestEvent
PaymentRequestEvent()