views:

65

answers:

1

Hi,

I'm using WinForms controls in IE. Something similar to this:

var MyControl = new ActiveXObject("MyComponent.MyControl")

and I want to be able to use prototype feature for MyControl.:

MyControl.prototype.newFunc = function(){alert('hi there');}

Is it possible at all? I thought about System.Runtime.InteropServices.Expando, but I can't find any comprehensive documentation about it.

Many Thanks, Paul.

A: 

I don't think that there is any way to modify the prototype of an ActiveX object because they do not inherit from the native js Object and therefore do not have a prototype.

Prestaul
Okay, and what if I use IExpando interface? Will I be able to add arbitrary fields to my ActiveX object in javascript code?
Paul Podlipensky