How does the P5 web editor sandbox code?

How does the P5 web editor take user code and run it while disallowing malicious user access. Does it simply use the eval function? Or does it interpret a subset of js on its own? Or neither?

Asking because I’d like to do something similar in a web view. Embedding a P5 editor.

Thanks!

Hi @dayetown,

If you like you can dig here and look what’s behind the scene…

Cheers
— mnse