Hi,
I'm trying to port a toolbar from Firefox to IE. Right now, the part
I'm working on is the toolbar's page manipulation functionality, which
is all written in Javascript. Since I want to be able to share a lot
of code between the Firefox edition (written in Javascript and XUL)
and the IE edition (written in C#), I would like to execute this
Javascript in the context of the page.
My first attempt involved using the execScript method of the
IHTMLWindow2 that I got from calling mshtml.HTMLDocument.parentWindow.
However, this method seems to execute the code in the security domain
of the current page, which causes breakage in some of the scripts.
Additionally, I would really like to have a persistent environment
(similar to the Firefox chrome environment) which is unrestricted and
which persists between pages, but which can access and modify state in
the same scripting environment as the currently loaded page (I hope
this makes sense).
My current tack is attempting to do this through the
IHTMLDocument.Script property, but I'm not sure if this implements
IActiveScript or not (and, if so, where IActiveScript is defined...).
Is this going to yield fruitful results? Any recommendations on how to
do this cleanly (or at all)?
Thanks,
Nathan