ServiceWorker

class Object
trait Matchable
class Any

Value members

Concrete methods

def addFetchEventListener(routes: IO[HttpRoutes[IO]])(implicit runtime: IORuntime): SyncIO[SyncIO[Unit]]

Adds a listener for FetchEvent. The provided IO is run once to install the routes. If the event is not intercepted by routes then it is treated as an ordinary request. Additional context can be retrieved via FetchEventContext including a Supervisor for running background tasks.

Adds a listener for FetchEvent. The provided IO is run once to install the routes. If the event is not intercepted by routes then it is treated as an ordinary request. Additional context can be retrieved via FetchEventContext including a Supervisor for running background tasks.

Returns:

an action for removing the listener.

Source:
ServiceWorker.scala