Lasse, for same-domain scripts I recall I could do that with a trick (reading external scripts content).
I don't have my old code at hand now (out of my country) but will try to find it when back home. The trick requires setting a child IFRAME src attribute with the path of the external script, then getting the IFRAME document textContent and stripping the unneeded parts with a regexp. This could be made to work with IE too. Still an hack though ... Diego On Wed, Aug 3, 2011 at 6:46 AM, Lasse Reichstein <[email protected]> wrote: > Either .text or .textContent should work, but only for script elements with > content, not those with src attributes. > For those with a src attribute, there is no good way to access the script > content. > That's a good thing, since script elements don't do same-domain checks, so > you can use them to load *any* content from *any* domain, and if you could > read the text, it would badly circumvent security. > /L > On Wed, Aug 3, 2011 at 1:14 PM, Dmitry Pashkevich <[email protected]> wrote: >> >> I've just tested that in Chrome and it didn't work >> >> -- >> To view archived discussions from the original JSMentors Mailman list: >> http://www.mail-archive.com/[email protected]/ >> >> To search via a non-Google archive, visit here: >> http://www.mail-archive.com/[email protected]/ >> >> To unsubscribe from this group, send email to >> [email protected] > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected] > -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
