HTMLIFrameElement: privateToken property
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
TheprivateToken property of theHTMLIFrameElement interface returns a string representation of an options object representing aprivate state token operation; this object has the same structure as theRequestInit dictionary'sprivateToken property.
This attribute mirrors the content of the associated<iframe> element'sprivateToken attribute.
In this article
Value
A string.
Examples
html
<iframe privateToken="{version: 1,operation: 'token-request'}"></iframe>js
const el = document.getElementById("el");console.log(el.privateToken);// Logs "{version: 1,operation: 'token-request'}"Specifications
| Specification |
|---|
| Private State Token API> # dom-htmliframeelement-privatetoken> |