//app part not related to ESOP JS implementation function main() { var devCfg = { audio: null, canvas: document.getElementById('C') //JS-specific implementation canvas DOM reference }, vm = UxnCore(), ext = ESOPExtensions() document.getElementById('apprun').addEventListener('click', function() { var fileObj = document.getElementById('appselect').files[0] if(fileObj.name.endsWith('.eso')) { var rdr = new FileReader() rdr.onload = function() { devCfg.audio = new (window.AudioContext || window.webkitAudioContext) vm.boot() ext.setup(vm, devCfg) vm.load(new Uint8Array(rdr.result)) console.log('VM started') vm.start(0x100) } rdr.readAsArrayBuffer(fileObj) } else window.alert('Please select an .eso file to run on ESOP') }) } addEventListener('DOMContentLoaded', main)