Firebug : go to canvas!
✓ Published0🌍 Public
Aabernier
Last edited Jul 7, 2011
Created on Jul 7, 2011
This example shows how to redirect Firebug’s command-line context to Facebook’s canvas iframe, enabling direct JavaScript and jQuery selector access from the console. The code executes a single Firebug API call, `cd($$(".canvas_iframe_util")[0].contentWindow)`, which uses `$$` to select the first iframe with the class `canvas_iframe_util` and then switches the console’s working window to that iframe’s content. It relies on Firebug’s built-in command-line functions rather than external libraries. The snippet is derived from a Stack Overflow answer and also includes a bookmarklet version for one-click activation.
AI-generated description