# Using airgap.js in Web Workers (/docs/consent-management/reference/workers)

## Overview [#overview]

airgap.js 9.118.0 and later can protect web workers.

### Limitations [#limitations]

airgap.js does not yet support consent sync within protected worker threads. This means that quarantined events aren’t replayed when consent changes outside the worker's realm, so quarantined events are effectively blocked.

## Loading airgap.js [#loading-airgapjs]

In order to apply airgap.js protections without our [realm auto-protection hooks](./realm-auto-protection.mdx#experimental-realm-auto-protection-hooks-for-same-origin-external-resources), use the following snippets:

### Declare Environment Metadata [#declare-environment-metadata]

```typescript
self.airgap = {
  loadOptions: {
    airgap: '[location of airgap.js]',
    baseUrl: '[URL of the original worker script]',
  },
};
```

### Import airgap.js [#import-airgapjs]

Classic worker

```typescript
importScripts(self.airgap.loadOptions.airgap);
```
