-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation? #2
Comments
Hello, Christopher! Originally this library was developed for use in the Bundle Transformer project, therefore as there is no documentation. I recommend to you watch the code of unit tests. Creation of documentation is planned. |
Sweet, thanks. |
Since no unit tests show any passing of objects from .net to chakra, I assume that doesn't work. Am I correct? |
Hello, AllNamesRTaken! You are right, passing of objects from .NET does not work. In documentation lists 5 supported types. Implementation of such functionality is not a trivial task. When I will have free time, then I'll take care of this problem. |
@AllNamesRTaken , could you share some examples on how you envision the functionality of accessing .net objects from JS code? FooBar a = new FooBar("hello"); // FooBar sets property named 'prop' which is of type string
string code = @"console.log(a.prop)";
RunScript(code); // should output 'hello'. I assume if this is supported then next step would be support calling object methods as well. |
@kunalspathak , this refers to the functionality of similar functionality from the ClearScript: using System;
using Microsoft.ClearScript;
using Microsoft.ClearScript.V8;
// create a script engine
using (var engine = new V8ScriptEngine())
{
…
// expose a host object
engine.AddHostObject("random", new Random());
engine.Execute("Console.WriteLine(random.NextDouble())");
…
} |
Thanks Andrey. Whenever I get chance, I will try to design on how this can be done. |
@kunalspathak , as a rule, I do not accept pull requests. |
Sure. This is very tempting problem to solve though, so I will work on the fork. Thanks @Taritsyn |
Actually, I was going to do it myself. |
Is there any documentation in place for this?
The text was updated successfully, but these errors were encountered: