Contents

onStateUpdate(_:)

Set a closure to be called when the browser’s state changes.

Declaration

@discardableResult final func onStateUpdate(_ handler: @escaping @isolated(any) @Sendable (NetworkBrowser<Provider>, NetworkBrowser<Provider>.State) -> Void) -> Self

Discussion

The closure may be called multiple times until the browser is cancelled.

The closure inherits the isolation domain of the caller.