Security & Privacy

sandbox="allow-top-navigation-to-custom-protocols"

Permits navigation to non-fetch schemes such as mailto when otherwise allowed. The same permission is also implied by certain broader sandbox tokens; external protocol handlers and browser prompts still apply. A space-separated token list on iframe. An empty sandbox imposes the full sandbox restrictions; each token removes a particular restriction, not all restrictions. This inert srcdoc demonstrates syntax only, not the granted capability.

Formal Syntax & Structure

html syntaxhtml
sandbox="allow-top-navigation-to-custom-protocols"

Parameters & Attributes

NameTypeDescription
sandboxspace-separated token listPermits navigation to non-fetch schemes such as mailto when otherwise allowed. The same permission is also implied by certain broader sandbox tokens; external protocol handlers and browser prompts still apply.

Working Example

Example Snippethtml
<iframe title="Isolated example" sandbox="allow-top-navigation-to-custom-protocols" srcdoc="&lt;p&gt;Embedded content&lt;/p&gt;"></iframe>

Browser Compatibility

Minimum supported versions across modern rendering engines

Chrome
Not supported in checked snapshot
No
Firefox
101
Yes
Safari
16
Yes
Checked desktop BCD snapshot: iframe sandbox token allow-top-navigation-to-custom-protocols. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted. Token support does not guarantee permission to perform the action in every context.
HTML Living Standard
HTML Reference