How to issue a call to a JsFunction.

Aug 29, 2012 at 3:36 PM


I am able to get a JsFunction instance out of a JsObject - that works fine.

Once I have the JsFunction, I want to execute it in the engine - the object has an Execute() function, but that requires a Visitor and the Visitor on Engine seems to be protected.

The reason I am not simply using Run() is because I want to execute the JsInstance on a given object - not simply a global function.

Any idea what the correct way of doing this is?

Aug 29, 2012 at 3:38 PM


JintEngine has a freaking CallFunction() on it.

Aug 29, 2012 at 3:41 PM

Nope.. CallFunction() calls a global JsFunction - there's no way to pass in "that" so that it will use it as "this" for the function.

Any way of doing this then?