HTMLIFrameElement: thuộc tính privateToken

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Thuộc tính privateToken của giao diện HTMLIFrameElement trả về một biểu diễn chuỗi của một đối tượng options đại diện cho một thao tác private state token; đối tượng này có cùng cấu trúc với thuộc tính privateToken của từ điển RequestInit.

Thuộc tính này phản chiếu nội dung của thuộc tính privateToken của phần tử <iframe> liên kết.

Giá trị

Một chuỗi.

Ví dụ

html
<iframe id="el" privateToken="{version: 1,operation: 'token-request'}">
</iframe>
js
const el = document.getElementById("el");
console.log(el.privateToken);
// Logs "{version: 1,operation: 'token-request'}"

Đặc tả kỹ thuật

Specification
Private State Token API
# dom-htmliframeelement-privatetoken

Tương thích trình duyệt

Xem thêm