demo · v140

device-attributes Permissions-Policy simulator

Configure a Permissions-Policy. The simulator below shows what each frame on a hypothetical page can read from the Device Attributes API given that policy, mirroring how Chrome 140 evaluates the new device-attributes directive.

top-level allowlist
embedded iframe origin

Resulting Permissions-Policy header:

top-level page

iframe (embed)

// Server response (top-level)
Permissions-Policy: device-attributes=(self "https://embed.example")

// In the embed iframe:
const id = await navigator.managed.getDirectoryId();  // throws if disallowed

see also