Get Content Of A External Script Included On Page
I have a script include on a page as following. Once the demo.js is loaded, I need
Solution 1:
Sadly no.
With pure JavaScript you can't get content of other JavaScript file without executing it.
Possible solutions:
- Use PHP
- Save your JS file as text file and then load it to iframe and get the source
- Get the source, but run the script
EDIT: With JavaScript you can't get full script, but function like:
var funcsourcecode = functionname.toString();
Post a Comment for "Get Content Of A External Script Included On Page"