WorkerNavigator
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
Note: This feature is only available in Web Workers.
The WorkerNavigator interface represents a subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the self.navigator property.
Instance properties
The WorkerNavigator interface doesn't inherit any property.
-
Always returns
'Mozilla', in any browser. This property is kept only for compatibility purposes. -
Returns the official name of the browser. Do not rely on this property to return the correct value.
-
Returns the version of the browser as a string. Do not rely on this property to return the correct value.
-
Provides a
NetworkInformationobject containing information about the network connection of a device. -
Returns the amount of device memory in gigabytes. This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024.
-
Returns a boolean indicating a user's consent to their information being shared or sold.
-
Returns the
GPUobject for the current worker context. The entry point for the WebGPU API. -
Returns the number of logical processor cores available.
-
Returns an
HIDobject providing methods for connecting to HID devices already granted permission by the user and listing attached HID devices, and event handlers for responding to HID devices connecting and disconnecting. -
Returns a string representing the preferred language of the user, usually the language of the browser UI. The
nullvalue is returned when this is unknown. -
Returns an array of strings representing the languages known to the user, by order of preference.
-
Returns a
LockManagerobject which provides methods for requesting a newLockobject and querying for an existingLockobject. -
Returns a
MediaCapabilitiesobject that can expose information about the decoding and encoding capabilities for a given format and output capabilities. -
Returns a boolean value indicating whether the browser is online.
-
Returns a
Permissionsobject that can be used to query and update permission status of APIs covered by the Permissions API. -
Returns a string representing the platform of the browser. Do not rely on this property to return the correct value.
-
Always returns
'Gecko', on any browser. This property is kept only for compatibility purposes. -
Returns a
Serialobject, which represents the entry point into the Web Serial API, to enable the control of serial ports. -
Returns a
ServiceWorkerContainerobject, which provides access to registration, removal, upgrade, and communication with theServiceWorkerobjects for the associated document. -
Returns a
StorageManagerinterface for managing persistence permissions and estimating available storage. -
Returns a
USBobject for the current document, providing access to WebUSB API functionality. -
Returns the user agent string for the current browser.
-
Returns a
NavigatorUADataobject, which gives access to information about the browser and operating system of the user.
Instance methods
The WorkerNavigator interface doesn't inherit any method.
Specifications
| Specification |
|---|
| HTML> # the-workernavigator-object> |
Browser compatibility
Loading…
See also
- Other Worker-related interfaces:
Worker,WorkerLocation, andWorkerGlobalScope - Using web workers