Suppose I was writing a Browser Hosting program in C#, then 1. How to call a Javascript function within my C# code? 1. How to expose C# events to Javascript?
Suppose I was writing a Browser Hosting program in C#, then 1. How to call a Javascript function within my C# code? 2. Is it possible and how to expose C# events to Javascript?
On Dec 15, 2:15 am, "Laser Lu" wrote: > Suppose I was writing a Browser Hosting program in C#, then > 1. How to call a Javascript function within my C# code? execScript > 1. How to expose C# events to Javascript? IDispatch interface.
Such a concise answer.:) However, thanks for your reply. "Nathan Moinvaziri" wrote in message news:0f56a81a-ec39-4959-a788-47f9244ae35e@d21g2000prf.googlegroups.com... > On Dec 15, 2:15 am, "Laser Lu" wrote: >> Suppose I was writing a Browser Hosting program in C#, then >> 1. How to call a Javascript function within my C# code? > > execScript > >> 1. How to expose C# events to Javascript? > > IDispatch interface. >
1 ExecScript 2 Javascript can handle COM events. You can write a COM visible class and assign an object of the class to the ObjectForScripting property of the webbrowser control. But you can also call a javascript function directly. -- Sheng Jiang Microsoft MVP in VC++ "Laser Lu" wrote in message news:#mrH#uvPIHA.5524@TK2MSFTNGP05.phx.gbl... > Suppose I was writing a Browser Hosting program in C#, then > 1. How to call a Javascript function within my C# code? > 2. Is it possible and how to expose C# events to Javascript? > >