Exposing .NET classes as prototypes

Apr 9, 2011 at 12:27 AM


I need to expose several .NET classes to javascript environment. I hope to see them as javascript prototype objects and later I would like to create objects of those classes.
Is it possible to accomplish this on Javascript.NET engine?




Apr 11, 2011 at 10:32 PM

Yes.  See SetParameter() in Documentation.  Give it a try.

Apr 11, 2011 at 10:53 PM

You will not be able to create prototype objects from .NET classes exposed using the Javascript.NET engine.

There's no way to instanciate .NET objects from Javascript using the "new" keyword. The only way to instanciate a .NET object is to do so from the .NET code and return it to the calling Javascript code.