PaymentRequestEvent: thuộc tính paymentRequestId
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 paymentRequestId của giao diện PaymentRequestEvent trả về ID của đối tượng PaymentRequest.
Giá trị
Một chuỗi chứa ID.
Ví dụ
js
self.addEventListener("paymentrequest", (e) => {
console.log(e.paymentRequestId);
});
Thông số kỹ thuật
| Specification |
|---|
| Web-based Payment Handler API> # dom-paymentrequestevent-paymentrequestid> |