Cd

From FirebugWiki
Revision as of 03:00, 13 July 2012 by Sebastianz (Talk | contribs) (Added parameter description and examples)

Jump to: navigation, search

By default, command line expressions are relative to the top-level window of the page. This command allows you to use the window of a frame in the page instead. So all expressions will be executed within the context of that frame from then on.

Syntax

cd(window)

Parameters

window

Frame window to switch to. (required)

Examples

cd(document.getElementById("someframe").contentWindow)

Changes to the window of the <frame> with the id someframe.

cd($$("iframe")[0].contentWindow)

Changes to the window of the first <iframe> using the $$ command.

See also