Open kellyelton opened 8 years ago
I eliminated 4 other options because they either require things like evai() to work which i think is bad practice especially if scripts can be supplied by a third party or they are very inactive with a long issue list that really needs fixing. Right now the options are edge, javascriptdotnet and Jint I have reviewed and rejected: clearscript nil.js ironJS jurassic
Jint link: https://github.com/sebastienros/jint
Yeah it seems like all of them but ironJS are actively updated.
After some testing i will relegate edge.js to the maybe/no pile due to having node.js inside it and that poses a security risk when we are dealing with 3rd party code. Other than the glaring security issue it would probably still fit the bill although objects get sent over in JSON and returned in the same format so calling functions on c# objects in JS would give issues but just changing values would work if you work over the changes when it gets returned.
Was using Jint
for a bit, but it couldn't properly use dynamic objects or actually operate on the objects passed in properly. Tried Javascript.net
and it was the same situation. Ended up using Clearscript
as it allowed DyamicObjects to be passed in by reference and allowed the javascript to modify the object that exists outside of its context.
That all being said, I don't know if Clearscript
is the best choice, I just chose it because I had to pick something. So this ticket can stay open so we can see if there's a better alternative.
There are plenty of options out there, so this ticket isn't to determine if it's even possible.
Requirements
The reason we don't want to have node.js integration is because it opens security holes with socket and file system access. The best model most likely will end up being a js engine that's only access to the outside world is through us.
Expected behavior of delegates
I have a few that could be researched as a headstart. https://github.com/tjanczuk/edge https://javascriptdotnet.codeplex.com/