Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Can we load other javascripts from javascript?

$
0
0
Hello!

You can easily expose a Rhino-like load() function:
publicdelegatevoid LoadFunc(paramsstring[] paths);
// ...
engine.Script.load = new LoadFunc(paths => {
    foreach (var path in paths) {
        engine.Execute(File.ReadAllText(path));
    }
});
Good luck!

Viewing all articles
Browse latest Browse all 2297

Trending Articles