Script Tags

For other browsers than the chrome browser or for other platforms like the desktop an alterna-tive way to have the Prolog interpreter running inside HTML content is the following JavaScript. It will call the main() method with the new "-w" command line option:

<script src="https://cjrtnc.leaningtech.com/1.3/loader.js"></script>
<script>
cheerpjInit();
cheerpjCreateDisplay(800,600);
cheerpjRunJar("/app/asterix/interpreter.jar", "-w");
</script>

Astonishingly the above configuration worked with a Safari browser on an iPad. Although the configuration as such was not very usable on the mobile platform, since at the time of writing this documentation, they soft keyboard did not show.

Comments