HTMLIFrameElement.setActive()

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The setActive() method of the HTMLIFrameElement sets the current <iframe> as the active frame, which has an effect on how it is prioritized by the process manager.

Syntax

instanceOfHTMLIframeElement.setActive(boolean);

Returns

Void.

Parameters

boolean
A Boolean that indicates whether the iframe is to be the active frame (true) or not (false).

Example

var browser = document.querySelector('iframe');
browser.setActive();

Specification

Not part of any specification.

Browser compatibility

Supported since Firefox 47, in chrome code only.

Unlikely ever to be supported in other browsers.

See also