# Class: `BroadcastChannelWrapper` [@jupyterlite/contents](../modules/jupyterlite_contents.md).BroadcastChannelWrapper A broadcaster for the ServiceWorker ## Implements - [`IBroadcastChannelWrapper`](../modules/jupyterlite_contents.md#ibroadcastchannelwrapper) ## Constructors ### `constructor` > > **`new BroadcastChannelWrapper`**(`options`) #### Parameters | Name | Type | | :------ | :------ | | `options` | [`IOptions`](../interfaces/jupyterlite_contents.BroadcastChannelWrapper.IOptions.md) | #### Defined in [packages/contents/src/broadcast.ts:15](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L15) ## Properties ### `_channel` > > `Protected` **`_channel`**: ``null`` \| `BroadcastChannel` = `null` #### Defined in [packages/contents/src/broadcast.ts:73](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L73) ### `_contents` > > `Protected` **`_contents`**: `IManager` #### Defined in [packages/contents/src/broadcast.ts:74](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L74) ### `_driveContentsProcessor` > > `Protected` **`_driveContentsProcessor`**: [`IDriveContentsProcessor`](../interfaces/jupyterlite_contents.IDriveContentsProcessor.md) #### Defined in [packages/contents/src/broadcast.ts:75](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L75) ### `_enabled` > > `Protected` **`_enabled`**: `boolean` = `false` #### Defined in [packages/contents/src/broadcast.ts:76](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L76) ### `isDisposed` > > **`isDisposed`**: `boolean` = `false` #### Implementation of IBroadcastChannelWrapper.isDisposed #### Defined in [packages/contents/src/broadcast.ts:13](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L13) ## Accessors ### `enabled` > > `get` **`enabled`**(): `boolean` #### Returns `boolean` #### Implementation of IBroadcastChannelWrapper.enabled #### Defined in [packages/contents/src/broadcast.ts:22](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L22) ## Methods ### `_onMessage` > > `Protected` **`_onMessage`**<`T`\>(`event`): `Promise`<`void`\> Handle a message received on the BroadcastChannel #### Type parameters | Name | Type | | :------ | :------ | | `T` | extends [`TDriveMethod`](../modules/jupyterlite_contents.md#tdrivemethod) | #### Parameters | Name | Type | | :------ | :------ | | `event` | `MessageEvent`<[`TDriveRequest`](../modules/jupyterlite_contents.md#tdriverequest)<`T`\>\> | #### Returns `Promise`<`void`\> #### Defined in [packages/contents/src/broadcast.ts:54](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L54) ### `disable` > > **`disable`**(): `void` #### Returns `void` #### Implementation of IBroadcastChannelWrapper.disable #### Defined in [packages/contents/src/broadcast.ts:36](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L36) ### `dispose` > > **`dispose`**(): `void` Clean up the broadcaster. #### Returns `void` #### Implementation of IBroadcastChannelWrapper.dispose #### Defined in [packages/contents/src/broadcast.ts:45](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L45) ### `enable` > > **`enable`**(): `void` #### Returns `void` #### Implementation of IBroadcastChannelWrapper.enable #### Defined in [packages/contents/src/broadcast.ts:26](https://github.com/jupyterlite/jupyterlite/blob/6de9813/packages/contents/src/broadcast.ts#L26)