Hello.
I have two class definitions in c# like this:
Now I would like to make the constructors available to the JavaScript Engine. However, not as global functions but as functions of some object. Something like this:
Is there a way to accomplish this? Any chance that this would even work with JavaScript's instanceof operator?
I have two class definitions in c# like this:
publicclass Foo { public Foobar(int x) { ... } }
publicclass Bar : Foo { public Bar(int x) : base(x) { ... } }
var engine = new V8ScriptEngine( name, flags, debugPort ); engine.Script.SomeObject.Foo = engine.CompileConstructor(typeof(Foo)); engine.Script.SomeObject.Bar = engine.CompileConstructor(typeof(Bar));