Allow ServiceWorker to control srcdoc iframes
- Policy ID
- ServiceWorkerToControlSrcdocIframeEnabled
- Scope
- Computer Configuration, User Configuration
- Supported on
- Microsoft Edge version 134, Windows 7 or later
- Source
- Microsoft Edge Policy Templates (version 155.0.4283.45)
- Category
- Microsoft Edge
Description
https://github.com/w3c/ServiceWorker/issues/765 asks srcdoc iframe with the "allow-same-origin" sandbox attribute to be under ServiceWorker control.
By default (if left unset) or when set to Enabled, Microsoft Edge makes srcdoc iframes with "allow-same-origin" sandbox attributes to be under ServiceWorker control.
Setting the policy to Disabled prevents ServiceWorker control over srcdoc iframes.
This policy is temporary and planned for deprecation in 2026.
Registry
ComputerHKEY_LOCAL_MACHINE
- ServiceWorkerToControlSrcdocIframeEnabledREG_DWORD
UserHKEY_CURRENT_USER
- ServiceWorkerToControlSrcdocIframeEnabledREG_DWORD