PaymentRequestEvent: thuộc tính total
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Note: This feature is only available in Service Workers.
Thuộc tính chỉ đọc total của giao diện PaymentRequestEvent trả về một đối tượng PaymentCurrencyAmount chứa tổng số tiền được yêu cầu để thanh toán.
Giá trị
Một đối tượng PaymentCurrencyAmount. Đối tượng này chứa các thuộc tính sau:
Ví dụ
js
self.addEventListener("paymentrequest", (e) => {
console.log(e.total);
});
Thông số kỹ thuật
| Specification |
|---|
| Web-based Payment Handler API> # dom-paymentrequestevent-total> |