Question

I am writing a BHO, the code using IHTMLDocument2::get_scripts to get all script body in the HTML file then use get_text() to get script source. But I found if script is embedded from a external file, the content is an empty string.

Is there any way to get source code from an IHTMLScriptElement that is created by ?

Was it helpful?

Solution

Use IHTMLScriptElement::src to get the url of the script, then dig the WinInet cache. if it is not cached, download again.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top