3 ms·
If you want the ability to manipulate a serializable JavaScript object graph without escapes static analysis is still overkill: a simple wrapper that only allow
by johncolanduoni 5y ago
If you want the ability to manipulate a serializable JavaScript object graph without escapes static analysis is still overkill: a simple wrapper that only allows accessing enumerable own properties in the desired object tree works fine and seems a lot easier to get right, without blacklisting a lot of commonly used words in the JS API to avoid escapes.
I’m really struggling to understand how making a sandboxed environment more “engaging” in a way that makes it more similar to Newgrounds-era flash that depends on this kind of thing at all. Newgrounds didn’t let you store data on their servers or anything. I suspect at the end of the day Flash had a good set of capabilities and a great authoring tool for making small games and animations, and there wasn’t anything more to it than that. I don’t remember any (non-malevolent) Newgrounds content that did anything more sophisticated with browser APIs than save stuff on local storage.