Hacker News new | ask | show | jobs
by tim1994 1500 days ago
Have you considered running "untrusted" code in a worker? That way the code can not interfere with the global scope.
1 comments

Indeed, however, I started this project a few years ago before I knew about workers and so it would be a lot of effort to switch now. Perhaps if I make a follow on game I'd try workers. I'd have to implement message routing in order for objects to communicate with each other and I'm not sure how much impact that would have on performance.