Page 1 of 1

Web works in IDE but not as Standalone

Posted: Sun Jan 16, 2022 12:32 pm
by peter_lboro
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

Re: Web works in IDE but not as Standalone

Posted: Sun Jan 16, 2022 6:19 pm
by peter_lboro
Further information: the problem is browser specific!

My sample standalone works normally with:
Safari (14.1.2 (14611.3.10.1.7))
Edge (97.0.1072.62)
Opera (82.0.4227.58)

My sample standalone doesn't work with:
Firefox (96.0.1)
Chrome (97.0.4692)

Peter

Re: Web works in IDE but not as Standalone

Posted: Sun Jan 16, 2022 6:32 pm
by FourthWorld
Are you attempting to run the files from your local disk, or downloaded from a server?

Some browsers prevent local execution of JavaScript for security reasons.

Re: Web works in IDE but not as Standalone

Posted: Mon Jan 17, 2022 10:52 am
by peter_lboro
I'm running from my website

Re: Web works in IDE but not as Standalone

Posted: Mon Jan 17, 2022 12:20 pm
by richmond62
Are you generating your web standalone from the DP of LC 10 or from a previous version?