There are two APIs you can use to delay the service worker: setTimeout() and setInterval(). setTimeout() delays the service worker for a specified period of time, while setInterval() delays the service worker at regular intervals.
In your case, you can use setTimeout() to delay the service worker for 30 seconds. The following code shows how to do this:
This is a best practice for delaying the service worker:
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/0357d3dc-567a-46a9-bd04-97fdfffae8e6n%40chromium.org.