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>.


instanceOfDOMRequest = instanceOfHTMLIframeElement.getVisible();


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>.




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

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


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,