[**@jupyterlite**](../../../README.md) *** [@jupyterlite](../../../README.md) / [@jupyterlite/server](../README.md) / ServiceWorkerManager # Class: ServiceWorkerManager Defined in: service-worker-manager.d.ts:11 A class that manages the ServiceWorker registration and communication, used for accessing the file system. ## Implements - [`IServiceWorkerManager`](../interfaces/IServiceWorkerManager.md) ## Constructors ### Constructor > **new ServiceWorkerManager**(`options`): `ServiceWorkerManager` Defined in: service-worker-manager.d.ts:15 Construct a new ServiceWorkerManager. #### Parameters ##### options [`IOptions`](../namespaces/IServiceWorkerManager/interfaces/IOptions.md) #### Returns `ServiceWorkerManager` ## Accessors ### browsingContextId #### Get Signature > **get** **browsingContextId**(): `string` Defined in: service-worker-manager.d.ts:27 A unique id to identify the browsing context where the ServiceWorkerManager was instantiated. ##### Returns `string` A unique id to identify the browsing context where the ServiceWorkerManager was instantiated. #### Implementation of [`IServiceWorkerManager`](../interfaces/IServiceWorkerManager.md).[`browsingContextId`](../interfaces/IServiceWorkerManager.md#browsingcontextid) *** ### enabled #### Get Signature > **get** **enabled**(): `boolean` Defined in: service-worker-manager.d.ts:23 Whether the ServiceWorker is enabled or not. ##### Returns `boolean` Whether the ServiceWorker is enabled or not. #### Implementation of [`IServiceWorkerManager`](../interfaces/IServiceWorkerManager.md).[`enabled`](../interfaces/IServiceWorkerManager.md#enabled) *** ### ready #### Get Signature > **get** **ready**(): `Promise`\<`void`\> Defined in: service-worker-manager.d.ts:31 Whether the ServiceWorker is ready or not. ##### Returns `Promise`\<`void`\> A Promise that resolves when the ServiceWorker is registered, or rejects if it cannot #### Implementation of [`IServiceWorkerManager`](../interfaces/IServiceWorkerManager.md).[`ready`](../interfaces/IServiceWorkerManager.md#ready) *** ### registrationChanged #### Get Signature > **get** **registrationChanged**(): `ISignal`\<[`IServiceWorkerManager`](../interfaces/IServiceWorkerManager.md), `null` \| `ServiceWorkerRegistration`\> Defined in: service-worker-manager.d.ts:19 A signal emitted when the registration changes. ##### Returns `ISignal`\<[`IServiceWorkerManager`](../interfaces/IServiceWorkerManager.md), `null` \| `ServiceWorkerRegistration`\> Signal fired when the registration changed. #### Implementation of [`IServiceWorkerManager`](../interfaces/IServiceWorkerManager.md).[`registrationChanged`](../interfaces/IServiceWorkerManager.md#registrationchanged) ## Methods ### registerStdinHandler() > **registerStdinHandler**(`pathnameSuffix`, `stdinHandler`): `void` Defined in: service-worker-manager.d.ts:37 Register a handler for stdin requests received via ServiceWorker. #### Parameters ##### pathnameSuffix `string` URL pathname suffix to match such as "kernel" or "terminal". ##### stdinHandler [`IStdinHandler`](../namespaces/IServiceWorkerManager/interfaces/IStdinHandler.md) #### Returns `void` #### Implementation of [`IServiceWorkerManager`](../interfaces/IServiceWorkerManager.md).[`registerStdinHandler`](../interfaces/IServiceWorkerManager.md#registerstdinhandler)