News for hackers. Stuff that matters.
Re:Show HN: Scratch.js – Interactive JavaScript Scratchpad by jraph on Wednesday November 18, 2020 @01:48PM (#25140700)
That's clever. Do you know if there is something possible using web workers? maybe running the "sandboxed code" in the worker? I don't really know how they work and if it is possible to interrupt them from the main thread.
Re:Show HN: Scratch.js – Interactive JavaScript Scratchpad by protoduction on Wednesday November 18, 2020 @01:53PM (#25140761)
I think so, but a worker won't have access to the DOM and a bunch of other APIs, so the code would be fairly limited in what it can do. Which may be fine for some usecases!