473,386 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Trying to get a scripting environment for a WebBrowserClass object

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

Feb 2 '07 #1
0 1230

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
by: Quest Master | last post by:
I am interested in developing an application where the user has an ample amount of power to customize the application to their needs, and I feel this would best be accomplished if a scripting...
8
by: Rodd Snook | last post by:
I have an application which makes extensive use of the Scripting.Dictionary object. I'm not doing anything silly like putting them outside the page scope -- just creating quite a few of them and...
3
by: Michael Hill | last post by:
I am trying to get all the "polyline" tags and then find the parent node above it so I can transform it. var poly = svgDocument.getElementsByTagName("polyline"); for ( var i=0; i < poly.length;...
6
by: darren | last post by:
I have a mature C/C++ application to which I am wanting to add custom delevopment/scripting capabilities. Initially this will be used as part of a testing framework. It appears to me that VBA...
17
by: Karl Irvin | last post by:
To use the Textstream object, I had to set a Reference to the Microsoft Scripting Runtime. This works good with A2000 Is the Scripting Runtime included with A2002 and A2003 so the Reference...
2
by: James | last post by:
Are there any classes in c# for this or am I left to use the com interface, which I'm not sure how. And if I have this will it work on a machine that someone has disabled scripting? Finally,...
6
by: lisa | last post by:
One of the things I hate the most about ASP.NET is the postback of an entire page just to update a single field. So I was looking around, and I came across Remote Scripting. See, when I write...
12
by: Tony Belding | last post by:
I'm interested in using an off-the-shelf interpreted language as a user-accessible scripting language for a MUCK. I'm just not sure if I can find one that does everything I need. The MUCK must be...
2
by: JosAH | last post by:
Greetings, Introduction Java is not Javascript and most of the times when questions end up in the wrong forum, they're moved to the other forum as soon as possible. Accidentally this article...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.