facebook - firebug: how to cd to an iframe -
i have facebook canvas application runs in iframe. debug page in firebug can not javascript scope iframe running app.
the iframe:
<iframe frameborder="0" src="[app_url_removed]" name="iframe_canvas" id="iframe_canvas" class="canvas_iframe_util" style="height: 905px;"></iframe> i've tried following , none of them work:
cd(iframe_canvas) cd(window.iframe_canvas) cd(iframe_canvas.window) cd($('iframe_canvas')) i have firefox 3.6.13 , have tried firebug 1.7a11 , firebug 1.6.2
also tried bookmarklet , various other things link firebug , jquery selectors in iframe no avail.
use 1 of these commands:
cd(frames[0]) cd(frames["iframe_canvas"]) and
cd(top) to return main window.
still, due bug doesn't work on cross-domain-iframes (http://code.google.com/p/fbug/issues/detail?id=3893). there 2 test cases can test evironment both cases:
- https://getfirebug.com/tests/content/commandline/cd.html (same domain, works me: ff 3.6.13, fb 1.6.2)
- http://getfirebug.com/tests/issues/3893/issue3893.html (cross domain, fails)
another possible source of surprise: if execute more commands @ once cd command seems not have effect directly following commands:
>>> cd(frames[0]); location.href; ["current window:", window cdframe.html] "https://getfirebug.com/tests/content/commandline/cd.html" >>> location.href "https://getfirebug.com/tests/content/commandline/cdframe.html"
Comments
Post a Comment