Reference
Your component runs in a sandbox
Pasted code is transpiled in the browser and rendered inside an iframe that allows scripts and nothing else: no same-origin access and no network. Everything that comes back out is treated as untrusted.
- Nothing you paste runs in the app
- The app never runs your code, and it can’t read your component’s DOM directly either. The two sides talk over a versioned message protocol that checks every message’s shape and source.
- Picked parts are found by position
- A part you pick inside a pasted component is identified by its place in the tree. Repeated class names and no ids are normal in real markup, so a selector could match the wrong one.
- A pick follows its part when the code changes
- Editing the source can move a part to a new position. Each pick also carries a fingerprint, checked after every render, so a part that moved is followed instead of swapped for whatever now sits there.
- Everything from the frame is limited
- Paths, labels and fingerprints are all size-limited before they can reach a saved document. Code in the frame could send fake replies, so every message is checked.