# Class: `ServiceWorkerManager` [@jupyterlite/server](../modules/jupyterlite_server.md).ServiceWorkerManager ## Implements - [`IServiceWorkerManager`](../modules/jupyterlite_server.md#iserviceworkermanager) ## Constructors ### `constructor` > > **`new ServiceWorkerManager`**(`options?`) #### Parameters | Name | Type | | :------ | :------ | | `options?` | [`IOptions`](../interfaces/jupyterlite_server.IServiceWorkerManager.IOptions.md) | #### Defined in [packages/server/src/service-manager.ts:11](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L11) ## Properties ### `_ready` > > `Private` **`_ready`**: `PromiseDelegate`<`void`\> #### Defined in [packages/server/src/service-manager.ts:117](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L117) ### `_registration` > > `Private` **`_registration`**: ``null`` \| `ServiceWorkerRegistration` = `null` #### Defined in [packages/server/src/service-manager.ts:113](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L113) ### `_registrationChanged` > > `Private` **`_registrationChanged`**: `Signal`<[`ServiceWorkerManager`](jupyterlite_server.ServiceWorkerManager.md), ``null`` \| `ServiceWorkerRegistration`\> #### Defined in [packages/server/src/service-manager.ts:114](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L114) ## Accessors ### `enabled` > > `get` **`enabled`**(): `boolean` Whether the ServiceWorker is enabled or not. #### Returns `boolean` #### Implementation of IServiceWorkerManager.enabled #### Defined in [packages/server/src/service-manager.ts:33](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L33) ### `ready` > > `get` **`ready`**(): `Promise`<`void`\> #### Returns `Promise`<`void`\> #### Implementation of IServiceWorkerManager.ready #### Defined in [packages/server/src/service-manager.ts:37](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L37) ### `registrationChanged` > > `get` **`registrationChanged`**(): `ISignal`<[`IServiceWorkerManager`](../modules/jupyterlite_server.md#iserviceworkermanager), ``null`` \| `ServiceWorkerRegistration`\> A signal emitted when the registration changes. #### Returns `ISignal`<[`IServiceWorkerManager`](../modules/jupyterlite_server.md#iserviceworkermanager), ``null`` \| `ServiceWorkerRegistration`\> #### Implementation of IServiceWorkerManager.registrationChanged #### Defined in [packages/server/src/service-manager.ts:23](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L23) ## Methods ### `_pingServiceWorker` > > `Private` **`_pingServiceWorker`**(): `Promise`<`void`\> #### Returns `Promise`<`void`\> #### Defined in [packages/server/src/service-manager.ts:101](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L101) ### `_setRegistration` > > `Private` **`_setRegistration`**(`registration`): `void` #### Parameters | Name | Type | | :------ | :------ | | `registration` | ``null`` \| `ServiceWorkerRegistration` | #### Returns `void` #### Defined in [packages/server/src/service-manager.ts:108](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L108) ### `initialize` > > `Private` **`initialize`**(`workerUrl`): `Promise`<`void`\> #### Parameters | Name | Type | | :------ | :------ | | `workerUrl` | `string` | #### Returns `Promise`<`void`\> #### Defined in [packages/server/src/service-manager.ts:61](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L61) ### `unregisterOldServiceWorkers` > > `Private` **`unregisterOldServiceWorkers`**(`scriptURL`): `Promise`<`void`\> #### Parameters | Name | Type | | :------ | :------ | | `scriptURL` | `string` | #### Returns `Promise`<`void`\> #### Defined in [packages/server/src/service-manager.ts:41](https://github.com/jupyterlite/jupyterlite/blob/999c7f0/packages/server/src/service-manager.ts#L41)