Let me break down the issue:
Ultimate Goal: Building a custom debugger window which shows a
function trace in and out of functions as they are called, which can
be executed via IE's Context Menu and used on any page (no source
changes needed, and all code can be IE-specific)
Mid-term Goal: To retrieve all the javascript source in the page, to
parse for function names, which can then be accessed in the window[]
namespace to retrieve their source.
Current Problem: I can't find a way to get access to the source of
external JS files, included using <SCRIPT SRC="">. If I look at the
innerHTML of the tag it is, of course, empty.
QUESTION: Is there any way to retrieve the source of the JS file,
other than using an IFRAME or something and loading the contents into
there to be read?
RELATED QUESTION: If not this, then is there any way (can be
IE6-specific) to access all the user-defined functions in a page? They
don't show up when you iterate the window[] namespace, yet they DO
exist there.
My debug windows is working, and my code currently goes in and renames
functions and adds debug message hooks. But it's useless if I can't
get access to the functions included in external files!
Thanks!
Matt Kruse
Javascript Toolbox: http://www.JavascriptToolbox.com/