# How does the P5 web editor sandbox code?

**URL:** https://discourse.processing.org/t/how-does-the-p5-web-editor-sandbox-code/38456
**Category:** Project Guidance
**Created:** [August 22, 2022, 2:39pm UTC](https://discourse.processing.org/t/how-does-the-p5-web-editor-sandbox-code/38456 "2022-08-22T14:39:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dayetown](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dayetown](https://discourse.processing.org/u/dayetown)
#### Post date: [August 22, 2022, 2:39pm UTC](https://discourse.processing.org/t/how-does-the-p5-web-editor-sandbox-code/38456/1 "2022-08-22T14:39:36Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [August 22, 2022, 4:39pm UTC](https://discourse.processing.org/t/how-does-the-p5-web-editor-sandbox-code/38456/2 "2022-08-22T16:39:24Z")

</div>

Hi @dayetown,

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

> **[GitHub - processing/p5.js-web-editor: p5.js Web Editor, officially launched!](https://github.com/processing/p5.js-web-editor)**
>
> p5.js Web Editor, officially launched! Contribute to processing/p5.js-web-editor development by creating an account on GitHub.

Cheers  
— mnse
