Web works in IDE but not as Standalone
Posted: Sun Jan 16, 2022 12:32 pm
I have an app that runs inside a web page. When I run it using the Test button in the IDE, the engine and app download and then run correctly. However, when I create a standalone it seems to load the engine and app but it doesn't run, the browser page remains blank.
Here is my setup:
1. on my web site I have a folder 'towersWeb' containing the following files:
towersOfHanoi.html
standalone-10.0.0-dp-1.js
standalone-10.0.0-dp-1.wasm
standalone.zip
2. the file towersOfHanoi.html contains the following:
<html>
<body>
<div> <canvas style="border: 0px none;" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
</div>
<script type="text/javascript">
var Module = { canvas: document.getElementById('canvas') };
</script>
<script async="" src="standalone-10.0.0-dp-1.js"></script>
</body>
</html>
I thought the problem might be the location of the towersOfHanoi.html file relative to the folder towersWeb, but I have tried placing the html file immediately outside the folder and inside the folder, but neither work. Nevertheless this feels like a reference problem, but I can't see it!
Any help please?
Peter
Here is my setup:
1. on my web site I have a folder 'towersWeb' containing the following files:
towersOfHanoi.html
standalone-10.0.0-dp-1.js
standalone-10.0.0-dp-1.wasm
standalone.zip
2. the file towersOfHanoi.html contains the following:
<html>
<body>
<div> <canvas style="border: 0px none;" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
</div>
<script type="text/javascript">
var Module = { canvas: document.getElementById('canvas') };
</script>
<script async="" src="standalone-10.0.0-dp-1.js"></script>
</body>
</html>
I thought the problem might be the location of the towersOfHanoi.html file relative to the folder towersWeb, but I have tried placing the html file immediately outside the folder and inside the folder, but neither work. Nevertheless this feels like a reference problem, but I can't see it!
Any help please?
Peter