MDN wants to learn about developers like you:


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

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support No support 47 (47)[1] No support No support No support
Feature Android Android Webview Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support No support No support No support No support No support No support

[1] Supported in chrome code only.

See also

Document Tags and Contributors

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