Hi again,
Lie is one possibility. Using it with ClearScript requires no modifications and only minor setup:
You just need to provide a
As for modules, ClearScript doesn't define or depend on any particular solution, as it provides only low-level script engine integration. With .NET facilities at its disposal, the host should be able to implement or reuse whatever packaging scheme it requires.
However, because existing implementations often assume a browser or Node.js environment, the host may have to provide a bit of plumbing. You can find an a RequireJS example here, and one that sets up a CommonJS environment here.
Cheers!
Lie is one possibility. Using it with ClearScript requires no modifications and only minor setup:
// setup engine.Execute(@" self = this; setTimeout = function (func, delay) { // add code here }; "); // run lie.js engine.Execute(File.ReadAllText(@"C:\path\to\lie.js")); // create a promise engine.Execute(@" x = new Promise(function (resolve, reject) { // add code here }); ");
setTimeout()
function that works with your application's async model.As for modules, ClearScript doesn't define or depend on any particular solution, as it provides only low-level script engine integration. With .NET facilities at its disposal, the host should be able to implement or reuse whatever packaging scheme it requires.
However, because existing implementations often assume a browser or Node.js environment, the host may have to provide a bit of plumbing. You can find an a RequireJS example here, and one that sets up a CommonJS environment here.
Cheers!