Catching any and all script function calls when automating IE
- From: marco.casalaina@xxxxxxxxx
- Date: 8 Mar 2006 18:19:20 -0800
Hi all,
I'm automating Internet Explorer, connecting to all running instances,
and what I'd like to do is receive an event for any Javascript function
calls made on the page. I've already sunk HTMLDocumentEvents, from
which I can catch the document events, but this isn't quite what I
need. Rather, if some event calls function foo(), and foo() calls
bar(), I'd like to receive two events, one telling me that foo was
called (with its parameters) and the other telling me that bar was
called.
Ideally, I'd even like to "de-bubble" the function calls -- that is,
get an event prior to the function actually being run, and do my own
thing, canceling the function.
My intuition says that the Script() property of IHTMLDocument2 is the
right way to go, but the only documentation I can find on that
describes how to call script functions from it by referring to it as an
IDispatchEx. I've got to think, though, that that object implements
some other, more descriptive interface; if I'm right, does anyone know
what interface that would be? How does the Microsoft Script Debugger
work? What I'm trying to do is somewhat similar to that.
I'm writing this all in C++/ATL, but a response referring to any
language would be fine. Thanks in advance.
-Marco
.
- Follow-Ups:
- Re: Catching any and all script function calls when automating IE
- From: Igor Tandetnik
- Re: Catching any and all script function calls when automating IE
- Prev by Date: Re: DOM text extraction
- Next by Date: Re: Catching any and all script function calls when automating IE
- Previous by thread: DOM text extraction
- Next by thread: Re: Catching any and all script function calls when automating IE
- Index(es):
Relevant Pages
|
|