Quantcast
Channel: Javascript .NET
Viewing all articles
Browse latest Browse all 137

Created Issue: Load External .js files within JavascriptContext block [11664]

$
0
0
Hello,

Is it possible to load an external script within my JavascriptContext using block?

```
using (JavascriptContext context = new JavascriptContext())
{
// Script
string script = @"
var ret = SomeFunDefinedInOtherFile(); // *** need to load this from other .js file
alert(ret);
";

// Running the script
context.Run(script);
}
```
Thanks everyone for your input.

Viewing all articles
Browse latest Browse all 137

Trending Articles



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