I followed the JSIL website and github guide, and I think my game is ready to be used in an HTML + javascript file, but I can't figure out why it giving me a loading error:
Loading data ... failed.
Unhandled exception at file:///C:/Users/Travis/Documents/GitHub/JSIL/bin/minesweepertest.html line 29:
Uncaught TypeError: undefined is not a function
Here is the HTML file i'm running:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body onload="onLoad()">
<script type="text/javascript">
var jsilConfig = {
printStackTrace: false,
xna: 4,
manifests: [
"minesweeper.exe",
"Content/minesweeper.contentproj"
],
};
</script>
<script src="../Libraries/JSIL.js" type="text/javascript"></script>
<canvas id="canvas" width="1280" height="720">
</canvas><br>
<div id="log"></div>
<script type="text/javascript">
function runMain () {
var asm = JSIL.GetAssembly("minesweeper", true);
var game = new asm.minesweeper.minesweeper();
game.Run();
};
</script>
</body>
</html>
The error on line 29 is highlighted, JSIL says it should be:
var game = new asm.YOURNAMESPACE.YOURGAME();
What am i doing wrong?
The basic JSIL HTML template is found here:
https://gist.github.com/kg/3702486[
^]