PaymentRequestEvent: thuộc tính topOrigin
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 topOrigin của giao diện PaymentRequestEvent trả về nguồn gốc người nhận thanh toán cấp cao nhất nơi đối tượng PaymentRequest được khởi tạo.
Giá trị
Một chuỗi.
Ví dụ
js
self.addEventListener("paymentrequest", (e) => {
console.log(e.topOrigin);
});
Thông số kỹ thuật
| Specification |
|---|
| Web-based Payment Handler API> # dom-paymentrequestevent-toporigin> |