iframe sandbox Playground

Mr. Harun’s guest content goes up in a glass case: write its sandbox, each allow-* opens one door, and a probe inside the real iframe reports what the browser…

Why it matters

Third-party embeds and user HTML are a way in for XSS, phishing and data theft. sandbox is the cheapest defence: lock everything first, open only what is needed. Get one token wrong (or forget the attribute) and the guest holds the house keys.

The key idea

An empty sandbox locks everything; each token opens one door

Common mistakes

Try it in this playground