Hi,
I'm trying to use the new "loadjs" feature.
This is my javascript:
Code
function functionToCall(var1) {
console.log("functionToCall called with " + var1);
return var1*2;
}
When I put the above code inside <script></script> in the main .html, I can use
I get the expected "4" in the console.
Now I want to use that same function, but inside a .js loaded through loadjs().
I tried various calls, but all return
jsget - ReferenceError: functionToCall is not defined
WARNING: Unknown action: functiontocall
For example with these statements:
The script itself loads fine, if I put a console.log() outside the function, the message is shown in the js console. Also, if I put functionToCall(2) outside the function, the function is executed. But I just cant access the functions in the script from with the krpano actions.
Anything I missed?