I have a JS function like this,
function foo(functionName){
console.log(typeof functionName);
}
My emscripten code looks like this,
int call() {
emscripten::val Global = emscripten::val::global("window");
emscripten::val FunctionName = emscripten::val::global("window")["zoo"];
emscripten::val GetType = Global.call<emscripten::val>("foo", FunctionName);
};
However, the type that emscripten pass to Function foo is an Object not a reference to function
Question maybe vague. I somehow need to pass the right type.
I tested this in Pure JS and it can differ functions and objects easily.