aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-11-25 14:37:41 +0100
committerTeddy Wing2023-11-25 14:37:41 +0100
commita4ecd256f1297080646bab1f9a29d196ea7e3a75 (patch)
tree208cc734f4ac4ed2227dfd67a389f3512e86fefa
parent344cd163e15382fb884e266bb986fd195c8cc1c5 (diff)
downloadswextreload-a4ecd256f1297080646bab1f9a29d196ea7e3a75.tar.bz2
swextreload: Explain 200 millisecond sleep before reloading tab
-rw-r--r--internal/swextreload.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/swextreload.go b/internal/swextreload.go
index 803f39e..1d5af22 100644
--- a/internal/swextreload.go
+++ b/internal/swextreload.go
@@ -86,7 +86,8 @@ func Reload(
isMV2 := isExtensionManifestV2(firstExtensionTarget)
- // TODO: Only do this in MV3.
+ // In Manifest V3, we need to wait until the service worker reinstalls
+ // before we can re-attach to it.
if !isMV2 {
time.Sleep(200 * time.Millisecond)
}