Skip to content

WorkerNavigator

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

Read offlineelide help api-wintercg-navigator

On this page

globalThis.navigator is a WorkerNavigator; 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));
utf-8 · js · Lines: 4

elide run navigator.mjs prints:

text
true true
true true
1 true
utf-8 · text · Lines: 3

Reference

Status: Full · Not measured

Exports

Export Kind Status Notes
WorkerNavigator class Full appCodeName, appName, appVersion, platform, product, userAgent, language, languages, onLine, hardwareConcurrency

Was this page helpful?