Re: Is it possible to enumerate all javascript scripts on a web page?



"Angus" <nospam@xxxxxxxxx> wrote in message
news:%23mu%23nxedHHA.3632@xxxxxxxxxxxxxxxxxxxx
** How do I query for IDispatchEx?

By calling QueryInterface, of course.

I am using this sort of thing at the moment:

CComPtr<IHTMLElementCollection> spElementColl;
// Retrieves an interface pointer to a zero-based collection of all
the // script objects in an HTML document
hr=spHTMLDoc->get_scripts(&spElementColl);

I was talking about IHTMLDocument::get_Script, _not_
IHTMLDocument2::get_scripts. The two produce very different objects.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.