mozilla

Revision 436109 of HTMLIFrameElement

  • Revision slug: Web/API/HTMLIFrameElement
  • Revision title: HTMLIFrameElement
  • Revision id: 436109
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{DomRef}}

The HTMLIFrameElement interface provides special properties and methods (beyond those of the {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating the layout and presentation of inline frame elements.

Properties

Inherits properties from its parent, {{domxref("HTMLElement")}}.

Name Type Description
align {{obsolete_inline}} {{domxref("DOMString")}} Specifies the alignment of the frame with respect to the surrounding context.
allowfullscreen {{experimental_inline}} {{domxref("Boolean")}} Indicates whether or not the inline frame is willing to be placed into full screen mode. See Using full-screen mode for details.
contentDocument {{readonlyInline}} {{domxref("Document")}} The active document in the inline frame's nested browsing context.
contentWindow {{readonlyInline}} {{domxref("WindowProxy")}} The window proxy for the nested browsing context.
frameborder {{obsolete_inline}} {{domxref("DOMString")}} Indicates whether to create borders between frames.
height {{domxref("DOMString")}} Reflects the {{htmlattrxref("height", "iframe")}} HTML attribute, indicating the height of the frame.
longDesc {{obsolete_inline}} {{domxref("DOMString")}} URI of a long description of the frame.
marginHeight {{obsolete_inline}} {{domxref("DOMString")}} Height of the frame margin.
marginWidth {{obsolete_inline}} {{domxref("DOMString")}} Width of the frame margin.
name {{domxref("DOMString")}} Reflects the {{htmlattrxref("name", "iframe")}} HTML attribute, containing a name by which to refer to the frame.
sandbox {{domxref("DOMSettableTokenList")}} Reflects the {{htmlattrxref("sandbox", "iframe")}} HTML attribute, indicating extra restrictions on the behavior of the nested content.
scrolling {{obsolete_inline}} {{domxref("DOMString")}} Indicates whether the browser should provide scrollbars for the frame.
seamless {{experimental_inline}} {{domxref("Boolean")}} Reflects the {{htmlattrxref("seamless", "iframe")}} HTML attribute, indicating that the inline frame should be rendered seamlessly within the parent document.
src {{domxref("DOMString")}} Reflects the {{htmlattrxref("src", "iframe")}} HTML attribute, containing the address of the content to be embedded.
srcDoc {{domxref("DOMString")}} The content to display in the frame.
width {{domxref("DOMString")}} Reflects the {{htmlattrxref("width", "iframe")}} HTML attribute, indicating the width of the frame.

Methods

No specific method; inherits properties from its parent, {{domxref("HTMLElement")}}.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', "the-iframe-element.html#the-iframe-element", "HTMLIFrameElement")}} {{Spec2('HTML WHATWG')}} The following property has been added: allowFullscreen.
{{SpecName('HTML5 W3C', "embedded-content-0.html#the-iframe-element", "HTMLIFrameElement")}} {{Spec2('HTML5 W3C')}} The following properties are now obsolete: scrolling, marginWidth, marginHeight, longDesc, frameBorder, and align.
The following properties have been added: srcdoc, sandbox, seamless, and contentWindow.
{{SpecName('DOM2 HTML', 'html.html#ID-50708718', 'HTMLIFrameElement')}} {{Spec2('DOM2 HTML')}} The contentDocument property has been added.
{{SpecName('DOM1', 'level-one-html.html#ID-50708718', 'HTMLIFrameElement')}} {{Spec2('DOM1')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}} {{CompatGeckoDesktop(1.0)}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
srcdoc 4 {{CompatGeckoDesktop(25)}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
sandbox 4 {{CompatGeckoDesktop(17)}} [1] {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
seamless {{experimental_inline}} 4 {{CompatNo}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
contentDocument {{CompatVersionUnknown}} {{CompatVersionUnknown}} 8.0 (for older version use HTMLIFrameElement.contentWindow.document instead) {{CompatVersionUnknown}} {{CompatVersionUnknown}}
contentWindow {{CompatUnknown}} {{CompatUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatUnknown}}
allowFullScreen {{experimental_inline}} 17 {{property_prefix("-webkit")}}
Daily test builds only
{{compatGeckoDesktop(9.0)}} {{property_prefix("-moz")}}
{{compatGeckoDesktop(18.0)}}
{{CompatNo}} {{CompatNo}} {{CompatNo}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatGeckoMobile(1.0)}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
srcdoc 4 {{CompatGeckoMobile(25)}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
sandbox 4 {{CompatGeckoMobile(17)}} [1] {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
seamless {{experimental_inline}} 4 {{CompatNo}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
contentDocument {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
contentWindow {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
allowFullScreen {{experimental_inline}} 17 {{property_prefix("-webkit")}}
Daily test builds only
{{compatGeckoMobile(9.0)}} {{property_prefix("-moz")}}
{{compatGeckoMobile(18.0)}}
{{CompatNo}} {{CompatNo}} {{CompatNo}}

[1] Gecko, and maybe other browsers as it is a late change in the specification, implements sandbox as a {{domxref("DOMString")}} instead of a {{domxref("DOMSettableTokenList")}} ({{bug(845067)}}).

Firefox OS notes

Firefox OS extend the HTMLIFrameElement interface to support browser iframes. Those extra methods are made for privileged applications which want to implement a browser like application for Firefox OS devices. Not that in that context, the HTMLIFrameElement also inherit methods from the {{domxref("EventTarget")}} interface. To learn how to implement such applications, see the Using the Browser API article.

{{domxref("HTMLIFrameElement.setVisible()","HTMLIFrameElement.setVisible(visible)")}}
Allows the parent to explicitly change the visibility state of the browser iframes.
{{domxref("HTMLIFrameElement.getVisible()","HTMLIFrameElement.getVisible()")}}
Returns the current visibility state of the browser iframe. Returns a {{domxref("DOMRequest")}}.
{{domxref("HTMLIFrameElement.sendMouseEvent()","HTMLIFrameElement.sendMouseEvent(type, x, y, button, clickCount, modifiers)")}}
Send a mouse event to the browser iframe.
{{domxref("HTMLIFrameElement.sendTouchEvent()","HTMLIFrameElement.sendTouchEvent(type, identifiers, touchesX, touchesY,radiisX, radiisY, rotationAngles, forces,count, modifiers)")}}
Send a touch event to the browser iframe.
{{domxref("HTMLIFrameElement.goBack()","HTMLIFrameElement.goBack()")}}
Navigate the browser iframe back.
{{domxref("HTMLIFrameElement.goForward()","HTMLIFrameElement.goForward()")}}
Navigate the browser iframe forward.
{{domxref("HTMLIFrameElement.reload()","HTMLIFrameElement.reload()")}}
Reload the browser iframe.
{{domxref("HTMLIFrameElement.stop()","HTMLIFrameElement.stop()")}}
Stop loading the browser iframe content.
{{domxref("HTMLIFrameElement.purgeHistory()","HTMLIFrameElement.purgeHistory()")}}
Allows to remove the all browsing history of the browser iframe.
{{domxref("HTMLIFrameElement.getScreenshot()","HTMLIFrameElement.getScreenshot(maxWidth, maxHeight)")}}
Allows to take a screenshot of the browser iframe's content, scaled to fit within maxWidth and maxHeight pixels. Returns a {{domxref("DOMRequest")}}.
{{domxref("HTMLIFrameElement.addNextPaintListener()","HTMLIFrameElement.addNextPaintListener()")}}
Add a listener to recieve an event the first time the browser iframe is ready to paint (This listener is sent an event after the first {{event("MozAfterPaint")}} event is dispacted in the iframe.)
{{domxref("HTMLIFrameElement.removeNextPaintListener()","HTMLIFrameElement.removeNextPaintListener()")}}
Remove the listener added by the previous function.
{{domxref("HTMLIFrameElement.getCanGoBack()","HTMLIFrameElement.getCanGoBack()")}}
Returns a {{domxref("DOMRequest")}} which result is a boolean indicating wether the browser iframe can be navigate backward.
{{domxref("HTMLIFrameElement.getCanGoForward()","HTMLIFrameElement.getCanGoForward()")}}
Returns a {{domxref("DOMRequest")}} which result is a boolean indicating wether the browser iframe can be navigate forward.

See also

  • The HTML element implementing this interface: {{HTMLElement("iframe")}}

Revision Source

<div>
  {{DomRef}}</div>
<p>The <strong><code>HTMLIFrameElement</code></strong> interface provides special properties and methods (beyond those of the {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating the layout and presentation of inline frame elements.</p>
<h2 id="Properties">Properties</h2>
<p><em>Inherits properties from its parent, {{domxref("HTMLElement")}}</em>.</p>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Type</th>
      <th scope="col">Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code>align</code>&nbsp;{{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>Specifies the alignment of the frame with respect to the surrounding context.</td>
    </tr>
    <tr>
      <td><code>allowfullscreen</code>&nbsp;{{experimental_inline}}</td>
      <td>{{domxref("Boolean")}}</td>
      <td>Indicates whether or not the inline frame is willing to be placed into full screen mode. See <a href="/en-US/docs/DOM/Using_full-screen_mode" title="https://developer.mozilla.org/en/DOM/Using_full-screen_mode">Using full-screen mode</a> for details.</td>
    </tr>
    <tr>
      <td><code>contentDocument</code>&nbsp;{{readonlyInline}}</td>
      <td>{{domxref("Document")}}</td>
      <td>The active document in the inline frame's nested browsing context.</td>
    </tr>
    <tr>
      <td><code>contentWindow</code>&nbsp;{{readonlyInline}}</td>
      <td>{{domxref("WindowProxy")}}</td>
      <td>The window proxy for the nested browsing context.</td>
    </tr>
    <tr>
      <td><code>frameborder</code>&nbsp;{{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>Indicates whether to create borders between frames.</td>
    </tr>
    <tr>
      <td><code>height</code></td>
      <td>{{domxref("DOMString")}}</td>
      <td>Reflects the {{htmlattrxref("height", "iframe")}} HTML&nbsp;attribute, indicating the height of the frame.</td>
    </tr>
    <tr>
      <td><code>longDesc</code>&nbsp;{{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>URI of a long description of the frame.</td>
    </tr>
    <tr>
      <td><code>marginHeight</code>&nbsp;{{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>Height of the frame margin.</td>
    </tr>
    <tr>
      <td><code>marginWidth</code>&nbsp;{{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>Width of the frame margin.</td>
    </tr>
    <tr>
      <td><code>name</code></td>
      <td>{{domxref("DOMString")}}</td>
      <td>Reflects the {{htmlattrxref("name", "iframe")}} HTML&nbsp;attribute, containing a name by which to refer to the frame.</td>
    </tr>
    <tr>
      <td><code>sandbox</code></td>
      <td>{{domxref("DOMSettableTokenList")}}</td>
      <td>Reflects the {{htmlattrxref("sandbox", "iframe")}} HTML&nbsp;attribute, indicating extra restrictions on the behavior of the nested content.</td>
    </tr>
    <tr>
      <td><code>scrolling</code>&nbsp;{{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>Indicates whether the browser should provide scrollbars for the frame.</td>
    </tr>
    <tr>
      <td><code>seamless</code>&nbsp;{{experimental_inline}}</td>
      <td>{{domxref("Boolean")}}</td>
      <td>Reflects the {{htmlattrxref("seamless", "iframe")}} HTML&nbsp;attribute, indicating that the inline frame should be rendered seamlessly within the parent document.</td>
    </tr>
    <tr>
      <td><code>src</code></td>
      <td>{{domxref("DOMString")}}</td>
      <td>Reflects the {{htmlattrxref("src", "iframe")}} HTML&nbsp;attribute, containing the address of the content to be embedded.</td>
    </tr>
    <tr>
      <td><code>srcDoc</code></td>
      <td>{{domxref("DOMString")}}</td>
      <td>The content to display in the frame.</td>
    </tr>
    <tr>
      <td><code>width</code></td>
      <td>{{domxref("DOMString")}}</td>
      <td>Reflects the {{htmlattrxref("width", "iframe")}}&nbsp;HTML&nbsp;attribute, indicating the width of the frame.</td>
    </tr>
  </tbody>
</table>
<h2 id="Methods">Methods</h2>
<p><em>No specific method; inherits properties from its parent, {{domxref("HTMLElement")}}</em>.</p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
    <tr>
      <td>{{SpecName('HTML WHATWG', "the-iframe-element.html#the-iframe-element", "HTMLIFrameElement")}}</td>
      <td>{{Spec2('HTML WHATWG')}}</td>
      <td>The following property has been added: <code>allowFullscreen</code>.</td>
    </tr>
    <tr>
      <td>{{SpecName('HTML5 W3C', "embedded-content-0.html#the-iframe-element", "HTMLIFrameElement")}}</td>
      <td>{{Spec2('HTML5 W3C')}}</td>
      <td>The following properties are now obsolete: <code>scrolling</code>, <code>marginWidth</code>, <code>marginHeight</code>, <code>longDesc</code>, <code>frameBorder</code>, and <code>align</code>.<br />
        The following properties have been added: <code>srcdoc</code>, <code>sandbox</code>, <code>seamless</code>, and <code>contentWindow</code>.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 HTML', 'html.html#ID-50708718', 'HTMLIFrameElement')}}</td>
      <td>{{Spec2('DOM2 HTML')}}</td>
      <td>The <code>contentDocument</code> property has been added.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM1', 'level-one-html.html#ID-50708718', 'HTMLIFrameElement')}}</td>
      <td>{{Spec2('DOM1')}}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<div>
  {{CompatibilityTable}}</div>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatGeckoDesktop(1.0)}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td><code>srcdoc</code></td>
        <td>4</td>
        <td>{{CompatGeckoDesktop(25)}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>sandbox</code></td>
        <td>4</td>
        <td>{{CompatGeckoDesktop(17)}} [1]</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>seamless</code> {{experimental_inline}}</td>
        <td>4</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>contentDocument</code></td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>8.0 (for older version use <code>HTMLIFrameElement.contentWindow.document</code> instead)</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td><code>contentWindow</code></td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>allowFullScreen</code> {{experimental_inline}}</td>
        <td>17 {{property_prefix("-webkit")}}<br />
          <em>Daily test builds only</em></td>
        <td>{{compatGeckoDesktop(9.0)}} {{property_prefix("-moz")}}<br />
          {{compatGeckoDesktop(18.0)}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatGeckoMobile(1.0)}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td><code>srcdoc</code></td>
        <td>4</td>
        <td>{{CompatGeckoMobile(25)}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>sandbox</code></td>
        <td>4</td>
        <td>{{CompatGeckoMobile(17)}} [1]</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>seamless</code> {{experimental_inline}}</td>
        <td>4</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>contentDocument</code></td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td><code>contentWindow</code></td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>allowFullScreen</code> {{experimental_inline}}</td>
        <td>17 {{property_prefix("-webkit")}}<br />
          <em>Daily test builds only</em></td>
        <td>{{compatGeckoMobile(9.0)}} {{property_prefix("-moz")}}<br />
          {{compatGeckoMobile(18.0)}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
      </tr>
    </tbody>
  </table>
</div>
<p>[1] Gecko, and maybe other browsers as it is a late change in the specification, implements <code>sandbox</code> as a {{domxref("DOMString")}} instead of a {{domxref("DOMSettableTokenList")}} ({{bug(845067)}}).</p>
<h3 id="Firefox_OS_notes">Firefox OS notes</h3>
<p>Firefox OS extend the <code>HTMLIFrameElement</code> interface to support browser iframes. Those extra methods are made for <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security/Application_security" title="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">privileged applications</a> which want to implement a browser like application for Firefox OS devices. Not that in that context, the <code>HTMLIFrameElement</code> also inherit methods from the {{domxref("EventTarget")}} interface. To learn how to implement such applications, see the <a href="/en-US/docs/WebAPI/Browser" title="/en-US/docs/WebAPI/Browser">Using the Browser API</a> article.</p>
<dl>
  <dt>
    {{domxref("HTMLIFrameElement.setVisible()","HTMLIFrameElement.setVisible(visible)")}}</dt>
  <dd>
    Allows the parent to explicitly change the visibility state of the browser iframes.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.getVisible()","HTMLIFrameElement.getVisible()")}}</dt>
  <dd>
    Returns the current visibility state of the browser iframe. Returns a {{domxref("DOMRequest")}}.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.sendMouseEvent()","HTMLIFrameElement.sendMouseEvent(type, x, y, button, clickCount, modifiers)")}}</dt>
  <dd>
    Send a mouse event to the browser iframe.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.sendTouchEvent()","HTMLIFrameElement.sendTouchEvent(type, identifiers, touchesX, touchesY,radiisX, radiisY, rotationAngles, forces,count, modifiers)")}}</dt>
  <dd>
    Send a touch event to the browser iframe.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.goBack()","HTMLIFrameElement.goBack()")}}</dt>
  <dd>
    Navigate the browser iframe back.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.goForward()","HTMLIFrameElement.goForward()")}}</dt>
  <dd>
    Navigate the browser iframe forward.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.reload()","HTMLIFrameElement.reload()")}}</dt>
  <dd>
    Reload the browser iframe.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.stop()","HTMLIFrameElement.stop()")}}</dt>
  <dd>
    Stop loading the browser iframe content.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.purgeHistory()","HTMLIFrameElement.purgeHistory()")}}</dt>
  <dd>
    Allows to remove the all browsing history of the browser iframe.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.getScreenshot()","HTMLIFrameElement.getScreenshot(maxWidth, maxHeight)")}}</dt>
  <dd>
    Allows to take a screenshot of the browser iframe's content, scaled to fit within <code>maxWidth</code> and <code>maxHeight</code> pixels. Returns a {{domxref("DOMRequest")}}.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.addNextPaintListener()","HTMLIFrameElement.addNextPaintListener()")}}</dt>
  <dd>
    Add a listener to recieve an event the first time the browser iframe is ready to paint (This listener is sent an event after the first {{event("MozAfterPaint")}} event is dispacted in the iframe.)</dd>
  <dt>
    {{domxref("HTMLIFrameElement.removeNextPaintListener()","HTMLIFrameElement.removeNextPaintListener()")}}</dt>
  <dd>
    Remove the listener added by the previous function.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.getCanGoBack()","HTMLIFrameElement.getCanGoBack()")}}</dt>
  <dd>
    Returns a {{domxref("DOMRequest")}} which <code>result</code> is a boolean indicating wether the browser iframe can be navigate backward.</dd>
  <dt>
    {{domxref("HTMLIFrameElement.getCanGoForward()","HTMLIFrameElement.getCanGoForward()")}}</dt>
  <dd>
    Returns a {{domxref("DOMRequest")}} which <code>result</code> is a boolean indicating wether the browser iframe can be navigate forward.</dd>
</dl>
<h2 id="See_also">See also</h2>
<ul>
  <li>The HTML element implementing this interface: {{HTMLElement("iframe")}}</li>
</ul>
Revert to this revision