IronJS icon indicating copy to clipboard operation
IronJS copied to clipboard

can i expose c# object methods in javascript

Open jharonfe opened this issue 11 years ago • 1 comments

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);
}
}

jharonfe avatar Dec 09 '14 17:12 jharonfe

Hey!

This project is abandoned.

Sorry

fholm avatar Dec 12 '14 13:12 fholm