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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>