# WorkerNavigator

> How Elide supports the `navigator` global: a WorkerNavigator whose userAgent, platform, language and other values are fixed at startup.

`globalThis.navigator` is a [`WorkerNavigator`](https://html.spec.whatwg.org/multipage/workers.html#the-workernavigator-object);
its values are fixed at startup, and the constructor throws if called.

| Attribute | Value |
|---|---|
| `appCodeName` | `"Mozilla"` |
| `appName` | `"Netscape"` |
| `product` | `"Gecko"` |
| `appVersion` | Elide version and platform. |
| `userAgent` | Elide user-agent string. |
| `platform` | `linux`, `darwin`, `win32`, another known host label, or `unknown`. |
| `language` | Runtime locale, normally a BCP-47 tag. |
| `languages` | Frozen one-element array containing `language`. |
| `onLine` | Always `true`. |
| `hardwareConcurrency` | Available processor count, at least 1. |

## Example

```js
// navigator.mjs
console.log(navigator instanceof WorkerNavigator, navigator.onLine);
console.log(navigator.hardwareConcurrency >= 1, navigator.userAgent.includes(" Elide/"));
console.log(navigator.languages.length, Object.isFrozen(navigator.languages));
```

`elide run navigator.mjs` prints:

```text
true true
true true
1 true
```

<!-- api-reference:start 94735135bc29 -->
## Reference

**Status:** Full · Not measured

### Exports

| Export | Kind | Status | Notes |
| --- | --- | --- | --- |
| `WorkerNavigator` | class | Full | `appCodeName`, `appName`, `appVersion`, `platform`, `product`, `userAgent`, `language`, `languages`, `onLine`, `hardwareConcurrency` |
<!-- api-reference:end -->
