You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to extend my C# application with JavaScript using IronJS. I have a set of custom C# objects. I supply these objects as inputs to a JavaScript function. I am able to access fields and properties of my C# objects in the script, however methods and delegates of the same objects come back as undefined. Is there a way using IronJS to expose the methods as well? Perhaps I missed a step when defining the context ?
Thanks.
example = function(CSharpObject)
{
try
{
debug(CSharpObject.Field); // returns the correct value
debug(CSharpObject.Method()); // returns undefined
}
catch(err)
{
debug(""Error: "" + err.message);
}
}
The text was updated successfully, but these errors were encountered:
I am attempting to extend my C# application with JavaScript using IronJS. I have a set of custom C# objects. I supply these objects as inputs to a JavaScript function. I am able to access fields and properties of my C# objects in the script, however methods and delegates of the same objects come back as undefined. Is there a way using IronJS to expose the methods as well? Perhaps I missed a step when defining the context ?
Thanks.
example = function(CSharpObject)
{
try
{
debug(CSharpObject.Field); // returns the correct value
debug(CSharpObject.Method()); // returns undefined
}
catch(err)
{
debug(""Error: "" + err.message);
}
}
The text was updated successfully, but these errors were encountered: