Invoke a javascript function with through COM Interop

I have a class registered for COM interop which I'm instantiating within an HTML page using the following code: I can call methods on it just fine, but suppose I want to set a javascript function as a property, like so: MyClass.TestFunction = function () { alert("It worked!"); } How would I set my code up to be able to fire that function? This is how MSXML works in javascript for XMLHttpRequest objects, you can set XHR.onreadystatechange = function () {} I'm looking for a similar implementation in my class.

以上就是Invoke a javascript function with through COM Interop的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准