EDIT: though now that I look at it, it's already possible:
https://daurnimator.github.io/lua.vm.js/script_example.html
The big thing lua.vm.js needs is weakrefs https://github.com/tc39/proposal-weakrefs
EDIT: though now that I look at it, it's already possible:
https://daurnimator.github.io/lua.vm.js/script_example.html