We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

HTMLIFrameElement.getVisible()

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 getVisible() method of the HTMLIFrameElement is used to request the current visible state of the browser <iframe>.

Syntax

instanceOfDOMRequest = instanceOfHTMLIframeElement.getVisible();

Returns

A DOMRequest object to handle the getVisible() request's success and error cases. If the request is successful, the request's result is a Boolean indicating the visible state of the browser <iframe>.

Parameters

None.

Example

var browser = document.querySelector('iframe');
var request = browser.getVisible();

request.onsuccess = function() {
  console.log('The visible state is: ' +
               this.result ? 'true' : 'false');
}

Specification

Not part of any specification.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No No471 No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No No No No No ?

1. Supported in chrome code only.

See also

Document Tags and Contributors

Contributors to this page: fscholz, chrisdavidmills, teoli, ajaybhat, kscarfone, ethertank, Jeremie
Last updated by: fscholz,