Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 908035 of Working with iframes

  • Revision slug: Tools/Working_with_iframes
  • Revision title: Working with iframes
  • Revision id: 908035
  • Created:
  • Creator: jsx
  • Is current revision? No
  • Comment Revert to revision of 2015-04-24 17:47:25 by Sheppy: "Reverting irrelevant copy-pasta edit added in self promotion."

Revision Content

This feature is new in Firefox 34.

From Firefox 34 onwards, you can point the developer tools at a specific iframe within a document.

{{EmbedYouTube("Me9hjqd74m8")}}

This feature is disabled by default: to enable it, open the developer tool settings and check "Select an iframe as the currently targeted document":

You'll now see a new button in the toolbar:

Click it, and you'll see a popup listing all the iframes in the document, as well as the main document itself.

Note that at the moment you'll need to reload the page or close and reopen the developer tools in order to see the popup. This is being tracked as bug 1062233.

If you select an entry in the list, all the tools in the toolbox - the Inspector, the Console, the Debugger and so on - will now target only that iframe, and will essentially behave as if the rest of the page does not exist.

Revision Source

<div class="geckoVersionNote">
<p>This feature is new in Firefox 34.</p>
</div>

<p>From Firefox 34 onwards, you can point the developer tools at a specific <a href="/en-US/docs/Web/HTML/Element/iframe"><code>iframe</code></a> within a document.</p>

<p>{{EmbedYouTube("Me9hjqd74m8")}}</p>

<p>This feature is disabled by default: to enable it, open the <a href="/en-US/docs/Tools/Tools_Toolbox#Settings">developer tool settings</a> and check "Select an iframe as the currently targeted document":</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/8551/frame-selection-setting.png" style="display: block; margin-left: auto; margin-right: auto;" />You'll now see a new button in the toolbar:</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/8547/frame-selection-button.png" style="display: block; margin-left: auto; margin-right: auto;" />Click it, and you'll see a popup listing all the iframes in the document, as well as the main document itself.</p>

<p><img alt="" src="https://mdn.mozillademos.org/files/8549/frame-selection-popup.png" style="display: block; margin-left: auto; margin-right: auto;" /></p>

<div class="note">
<p>Note that at the moment you'll need to reload the page or close and reopen the developer tools in order to see the popup. This is being tracked as <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1062233">bug 1062233</a>.</p>
</div>

<p>If you select an entry in the list, all the tools in the toolbox - the <a href="/en-US/docs/Tools/Page_Inspector">Inspector</a>, the <a href="/en-US/docs/Tools/Web_Console">Console</a>, the <a href="/en-US/docs/Tools/Debugger">Debugger</a> and so on - will now target only that iframe, and will essentially behave as if the rest of the page does not exist.</p>
Revert to this revision