473,671 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.HTMLDocu ment.parentWind ow.
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.S cript 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 1237

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

Similar topics

33
2722
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 language was available. However, I want to code this application in Python, and I have not yet heard of an implementation of another scripting language into Python. An example of what I mean is this (an implementation of Lua into Ruby -- which I'd...
8
5580
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 stuffing quite a lot of data (from and MS SQL database) into them. On Windows 2000 server, everything is fine. If the data structures get really big it slows down, but for normal operation it's no problem. Recently our hosting provider moved to...
3
1920
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; i++ ) { myobj=poly.parentNode(i); alert(i + myobj); }
6
1963
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 has been replaced with the .NET environment, and I am interested in what tools are available for creating such a development environment (eg generating a custom IDE) and a list of the basic interfaces that the existing app would need to support...
17
4196
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 won't be broken when my app is opened with those versions. Also is the Scripting Runtime included as part of the A2000 Runtime Engine which some of my customers use.
2
2034
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, if I have MyClass objectA can I give it functions like MakeBigger that would be available from the script? I'm new to this so thanks for any info!!
6
3249
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 ASP pages, I usually have a hidden iframe on the page that I post to. And onload, that hidden page copies the results back up to the parent. I work in an IE only environment, so I can get away with that. And it's nice. Seamless. It's nice...
12
2940
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 able to call the interpreter and execute scripts with it, but the interpreter must also be able to call functions in the MUCK code. And then there's the security issue that really worries me. . . I have to be able to limit what the interpreter...
2
6496
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 talks about Javascript a bit but it belongs in the Java section. Since version 1.6 of Java a script engine comes packaged with the core classes. A script engine is an abstract little framework that offers support for other
0
8478
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8919
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8821
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8599
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6230
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2052
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.