Friday, November 7, 2008

Snippet: External javascript Eval window

Below a code which (especially) in MSIE will be helpfull when debugging a webpage in frontend. The script opens a small window containing a textarea where you may enter your javascript code. When you Evaluete the code it will be in the context of the current window, so you can examine or edit the DOM tree of the document which is in the window where you clicked the Snippet.

You should create your snippet by

  1. Create a bookmark (any page)
  2. Place the bookmark in the "links" area, so that it will be available in your toolbar
  3. Edit the bookmark (right click) and paste the code below into the URL
  4. Rename it (to say "EVAL")

Here is the code:



No comments: