PaymentRequestUpdateEvent

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers .

PaymentRequestUpdateEvent interface is used for events sent to a PaymentRequest instance when changes are made to shipping-related information for a pending PaymentRequest . Those events are:

shippingaddresschange Secure context
Dispatched whenever the user changes their shipping address.
Also available using the onshippingaddresschange event handler property.
shippingoptionchange Secure context
Dispatched whenever the user changes a shipping option.
Also available using the onshippingoptionchange event handler property.

构造函数

PaymentRequestUpdateEvent() Secure context
创建新的 PaymentRequestUpdateEvent 对象。

特性

Provides only the properties inherited from its parent interface, Event .

方法

In addition to methods inherited from the parent interface, Event , PaymentRequestUpdateEvent offers the following methods:

PaymentRequestUpdateEvent.updateWith() Secure context
If the event handler determines that information included in the payment request needs to be changed, or that new information needs to be added, it calls updateWith() with the information that needs to be replaced or added.

规范

规范 状态 Comment
支付请求 API
The definition of 'PaymentRequestUpdateEvent' in that specification.
候选推荐 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
PaymentRequestUpdateEvent Chrome 61 Edge ≤18 Firefox 56
注意事项 Disabled
56
注意事项 Disabled
Available only in nightly builds.
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to A comma-delineated list of one or more 2-character ISO country codes indicating the countries in which to support payments (for example, US,CA . ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari Yes WebView Android 不支持 No Chrome Android 56
56
53 — 56
Disabled
Disabled From version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Firefox Android 56
注意事项 Disabled
56
注意事项 Disabled
Available only in nightly builds.
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and the dom.payments.request.supportedRegions preference (needs to be set to A comma-delineated list of one or more 2-character ISO country codes indicating the countries in which to support payments (for example, US,CA . ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS Yes Samsung Internet Android 6.0
PaymentRequestUpdateEvent() 构造函数 Chrome 61 Edge ≤79 Firefox 56
注意事项 Disabled
56
注意事项 Disabled
Available only in nightly builds.
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 56
56
53 — 56
Disabled
Disabled From version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Firefox Android 56
注意事项 Disabled
56
注意事项 Disabled
Available only in nightly builds.
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 6.0
updateWith() Chrome 61 Edge 15 Firefox 56
注意事项 Disabled
56
注意事项 Disabled
Available only in nightly builds.
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari Yes WebView Android 不支持 No Chrome Android 56
56
53 — 56
Disabled
Disabled From version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to Enabled ). To change preferences in Chrome, visit chrome://flags.
Firefox Android 56
注意事项 Disabled
56
注意事项 Disabled
Available only in nightly builds.
Disabled From version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS Yes Samsung Internet Android 6.0

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知
见实现注意事项。
用户必须明确启用此特征。
用户必须明确启用此特征。

另请参阅