I would like to be able to make an application that uses open layers directly on my WPF application. I found that I can create a browser object and have that invoke JavaScript, but I don't need a full browser. Is there some scripting object that I can use and bypass the browser object all together?
You don't need a web browser or the WebBrowser control to use JavaScript within NET Framework. NET Framework has a built-in JavaScript implementation that implements a superset of JavaScript / ECMAScript, as described here and here.
To use NET Framework's built in JavaScript implementation:
Microsoft.JScript
assemblynew JScriptCodeProvider().CreateCompiler().CompileAssemblyFromSource(...).CompiledAssembly
to compile your JavaScript to an assemblyNote that if your JavaScript code is designed to manipulate a DOM or use other features of a web browser, you can still use the NET Framework's version of JavaScript but you will have to provide the expected objects yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With