Allow ServiceWorker to control srcdoc iframes
Supported on: Microsoft Edge version 134, Windows 7 or later
Registry
HKLM
Software\Policies\Microsoft\Edge HKCU
Software\Policies\Microsoft\Edge Value name: ServiceWorkerToControlSrcdocIframeEnabled
Enabled: ServiceWorkerToControlSrcdocIframeEnabled = 1
Disabled: ServiceWorkerToControlSrcdocIframeEnabled = 0
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.