MDN self-hosted library · e01.org

HTMLIFrameElement: browsingTopics property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<iframe browsingtopics title="Advertising container" src="ad-tech1.example">
  ...
</iframe>
js
const iframeElem = document.querySelector("iframe");
console.log(iframeElem.browsingTopics); // will return true in supporting browsers
html
<iframe> ... </iframe>
js
const iframeElem = document.querySelector("iframe");

iframeElem.browsingTopics = true;
iframeElem.title = "Advertising container";
iframeElem.src = "ad-tech1.example";