Adding a global namespace to .net Webbrowser Control
Scenario: A widget developer codes using HTML and javascript. My vb.net application allows developers to create widgets for other users.
in javascript you can call window.external to comunicate with the host windows scripting object and I would like to add a helper namespace with many functions to aid the development of widgets similar to windows sid开发者_JAVA百科ebar's System namespace.
Problem: So I could allow developers to use Window.External.System but how can I just allow them to access System directly without using Window.External?
Microsoft adds a System Namespace to windows sidebar gadgets host window which is just an internet explorer server window.
Please help! I know this is a fairly complicated question.
You could add to the page that your WebBrowser control displays a series of JavaScript functions that forward to Window.External.
Widget makers can then code with the simple syntax and your .NET helpers are called through Window.External.
精彩评论