A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/HTMLIFrameElement/browsingTopics below:

HTMLIFrameElement: browsingTopics property - Web APIs

HTMLIFrameElement: browsingTopics property

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

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

Warning: This feature is currently opposed by two browser vendors. See the Standards positions section for details of opposition.

The browsingTopics property of the HTMLIFrameElement interface is a boolean specifying that the selected topics for the current user should be sent with the request for the associated <iframe>'s source in a Sec-Browsing-Topics header. This reflects the browsingtopics HTML attribute.

See Using the Topics API for more details.

Value

A boolean. The default value is false; set it to true to send the associated <iframe> source request with a Sec-Browsing-Topics header containing the selected topics for the current user.

Examples Get

Set browsingtopics to true then load the <iframe> contents declaratively:

<iframe browsingtopics title="Advertising container" src="ad-tech1.example">
  ...
</iframe>

Log the browsingTopics value via script:

const iframeElem = document.querySelector("iframe");
console.log(iframeElem.browsingTopics); // will return true in supporting browsers
Set

Specify a minimum <iframe>:

Set browsingtopics to true then load the <iframe> contents via script:

const iframeElem = document.querySelector("iframe");

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

This feature is not part of an official standard, although it is specified in the Topics API Unofficial Proposal Draft.

Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4