Quantcast
Channel: Questions in topic: "javascript"
Viewing all articles
Browse latest Browse all 68

How to call javascript functions from functions defined within .jslib plugins?

$
0
0
This seems pretty straightforward but thus far I haven't found any info regarding this issue. Say I have the following code:

mergeInto(LibraryManager.library, { Example: function (){ // Do some things var thing = CodeToCall(); }, CodeToCall: function (){ return 10; } });
Though it compiles and I can run my game over the web, whenever my C# code makes a call to Example, it executes the function, but then says that CodeToCall is not defined as a function. This is my first foray into implementing Javascript into my game so that I can interact with the page, so there may be something vital that I didn't realize I needed to do.

Any insight is appreciated!

Viewing all articles
Browse latest Browse all 68

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>