为IE中托管的WinForms控件实现原型相似的功能

问题描述 投票:0回答:1

我在IE中使用WinForms控件。与此类似的东西:

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

我希望能够为MyControl使用原型功能:

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

有可能吗?我想过System.Runtime.InteropServices.Expando,但我找不到任何关于它的综合文档。

javascript winforms internet-explorer com
1个回答
0
投票

我不认为有任何方法可以修改ActiveX对象的原型,因为它们不从本机js Object继承,因此没有原型。

© www.soinside.com 2019 - 2024. All rights reserved.