I have a project that I'm working on to wrap JS to a C# Win Form, however, all but one runtime does not have require.
require support: Node.JS
Comments: ** Comment from web user: noogen **
require support: Node.JS
Comments: ** Comment from web user: noogen **
How would require work? As my use of js.net is in a sandbox, I'm actually against require if it attempt to read some file on the file system.
I do use nodejs scripts inside my sandbox and I simulate require simply as:
ctx.SetParameter("somePathImplementation", new SomePathImplementation);
ctx.Run(@"require = function(name) {
if (name == 'path') return somePathImplementation;
else if (name == 'fs') return someFsImpementation;
});"