Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
45
rated 0 times [  49] [ 4]  / answers: 1 / hits: 72983  / 13 Years ago, tue, november 1, 2011, 12:00:00

I would like to change the context of the javascript executed in the webkit developer tool/firebug console to execute its code like it is running from inside an iframe on the page.



I know I could do this by opening the page in the iframe on a separate page, but I want to run code where it interacts with the parent frame.


More From » iframe

 Answers
15

Chrome 15 allows you to change the scope of the console. On the bottom of the console, next to the clear console button, there is a menu that says <top frame> which will give a list of available frames:



enter



Firefox has a similar feature currently in development:



enter






You can also navigate across frames using the command line:



var frame = document.getElementById(frame1).contentWindow;
cd(frame);

[#89353] Saturday, October 29, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hadens

Total Points: 142
Total Questions: 98
Total Answers: 100

Location: Kenya
Member since Mon, Jun 14, 2021
3 Years ago
;