allow (Permissions Policy)
The allow attribute sets the Permissions Policy for one iframe. It lists the browser features that the framed page may use, such as the camera, the microphone, or fullscreen.
HTML attribute
Also called Permissions-Policy, Feature Policy
Updated
On this page
Example
HTML
<iframe src="https://widget.example/call" allow="camera; microphone; fullscreen" title="Video call" ></iframe>
A feature with no origin list uses 'src', the origin of the URL in src.
How to set it
List each feature the frame needs. Separate features with semicolons. Add origins after a feature to limit it.
<iframe src="https://widget.example/map" allow="geolocation 'src'; fullscreen 'none'" title="Store map" ></iframe>
The allow attribute cannot give more than the parent page has. If the Permissions-Policy header of the parent blocks a feature, the frame cannot use it.
Learn more
Sources