This project has moved and is read-only. For the latest updates, please go here.

How do you reload/recompile javascript file

Oct 31, 2013 at 2:59 PM
sir, madams

thank you for a nice project...

Question :
I have created javascript file with some functions and loading it into my C# application to call methods in it,

if i change some method inside the *.js file then the application flow remains same and I need to restart application to reload that change,

it is like Addons for FireFox,
I intend to have it like Chrome way ...

how to do, will you please guide
Oct 31, 2013 at 8:29 PM

The dynamic nature of JavaScript makes it unnecessary to restart your application. You can read a script file into memory and execute it via ScriptEngine.Evaluate() as many times as necessary.

One thing to consider is whether to create a new instance of the script engine every time. Doing so is more costly, but it provides a consistent, clean environment for your JavaScript extensions.

Good luck!
Marked as answer by PrashantIsPatil on 11/19/2013 at 9:26 PM