Navigator extension type

The Navigator interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities.

A Navigator object can be retrieved using the read-only window.navigator property.


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions

Properties

appCodeName String
The value of the Navigator.appCodeName property is always "Mozilla", in any browser. This property is kept only for compatibility purposes.
no setter
appName String
The value of the Navigator.appName property is always "Netscape", in any browser. This property is kept only for compatibility purposes.
no setter
appVersion String
Returns either "4.0" or a string representing version information about the browser.
no setter
clipboard Clipboard
The clipboard read-only property of the Navigator interface returns a Clipboard object used to read and write the clipboard's contents.
no setter
connection NetworkInformation
The connection read-only property of the Navigator interface returns a NetworkInformation object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.
no setter
cookieEnabled bool
navigator.cookieEnabled returns a Boolean value that indicates whether cookies are enabled or not.
no setter
credentials CredentialsContainer
The credentials read-only property of the Navigator interface returns the CredentialsContainer object associated with the current document, which exposes methods to request credentials. The CredentialsContainer interface also notifies the user agent when an interesting event occurs, such as a successful sign-in or sign-out. This interface can be used for feature detection.
no setter
deviceMemory double
The deviceMemory read-only property of the Navigator interface returns the approximate amount of device memory in gigabytes.
no setter
geolocation Geolocation
The Navigator.geolocation read-only property returns a Geolocation object that gives Web content access to the location of the device. This allows a website or app to offer customized results based on the user's location.
no setter
hardwareConcurrency int
The navigator.hardwareConcurrency read-only property returns the number of logical processors available to run threads on the user's computer.
no setter
hashCode int
The hash code for this object.
no setterinherited
language String
The Navigator.language read-only property returns a string representing the preferred language of the user, usually the language of the browser UI.
no setter
languages JSArray<JSString>
The Navigator.languages read-only property returns an array of strings representing the user's preferred languages. The language is described using language tags according to 5646, "Tags for Identifying Languages (also known as BCP 47)". In the returned array they are ordered by preference with the most preferred language first.
no setter
locks LockManager
The locks read-only property of the Navigator interface returns a LockManager object which provides methods for requesting a new Lock object and querying for an existing Lock object.
no setter
maxTouchPoints int
The maxTouchPoints read-only property of the Navigator interface returns the maximum number of simultaneous touch contact points are supported by the current device.
no setter
mediaCapabilities MediaCapabilities
The Navigator.mediaCapabilities read-only property returns a MediaCapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities as defined by the Media Capabilities API.
no setter
mediaDevices MediaDevices
The mediaDevices read-only property of the Navigator interface returns a MediaDevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.
no setter
mediaSession MediaSession
The mediaSession read-only property of the Navigator interface returns a MediaSession object that can be used to share with the browser metadata and other information about the current playback state of media being handled by a document.
no setter
mimeTypes MimeTypeArray
Returns a MimeTypeArray object, which contains a list of MimeType objects representing the MIME types recognized and supported by the browser. The array can be queried for information about the enabled plugin that is used to handle a file of the specified type. Named properties of the returned object are not enumerable (except in very old browser versions).
no setter
onLine bool
Returns the online status of the browser. The property returns a boolean value, with true meaning online and false meaning offline. The property sends updates whenever the browser's ability to connect to the network changes. The update occurs when the user follows links or when a script requests a remote page. For example, the property should return false when users click links soon after they lose internet connection.
no setter
oscpu String
The Navigator.oscpu property returns a string that identifies the current operating system.
no setter
pdfViewerEnabled bool
The pdfViewerEnabled read-only property of the Navigator interface indicates whether the browser supports inline display of PDF files when navigating to them.
no setter
permissions Permissions
The permissions read-only property of the Navigator interface returns a Permissions object that can be used to query and update permission status of APIs covered by the Permissions API.
no setter
platform String
The platform property read-only property of the Navigator interface returns a string identifying the platform on which the user's browser is running.
no setter
plugins PluginArray
Returns a PluginArray object, listing the Plugin objects describing the plugins installed in the application. Named properties of the returned object are not enumerable (except in very old browser versions).
no setter
presentation JSObject
The presentation read-only property of Navigator serves as the entry point for the Presentation API and returns a reference to Presentation object.
no setter
product String
The value of the Navigator.product property is always "Gecko", in any browser. This property is kept only for compatibility purposes.
no setter
productSub String
The Navigator.productSub read-only property that returns either the string "20030107", or the string "20100101".
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceWorker ServiceWorkerContainer
The serviceWorker read-only property of the Navigator interface returns the ServiceWorkerContainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the ServiceWorker.
no setter
storage StorageManager
The Navigator.storage read-only property returns the singleton StorageManager object used to access the overall storage capabilities of the browser for the current site or app. The returned object lets you examine and configure persistence of data stores and learn approximately how much more space your browser has available for local storage use.
no setter
usb JSObject
The usb read-only property of the Navigator interface returns a USB object for the current document, providing access to WebUSB API functionality.
no setter
userActivation UserActivation
The read-only userActivation property of the Navigator interface returns a UserActivation object which contains information about the current window's user activation state.
no setter
userAgent String
The Navigator.userAgent read-only property returns the user agent string for the current browser.
no setter
vendor String
The value of the Navigator vendor property is always either "Google Inc.", "Apple Computer, Inc.", or (in Firefox) the empty string.
no setter
vendorSub String
The value of the Navigator.vendorSub property is always the empty string, in any browser.
no setter
wakeLock WakeLock
The wakeLock read-only property of the Navigator interface returns a WakeLock interface that allows a document to acquire a screen wake lock. While a screen wake lock is active, the user agent will try to prevent the device from dimming the screen, turning it off completely, or showing a screensaver.
no setter
webdriver bool
The webdriver read-only property of the navigator interface indicates whether the user agent is controlled by automation.
no setter
windowControlsOverlay JSObject
The windowControlsOverlay read-only property of the Navigator interface returns the WindowControlsOverlay interface, which exposes information about the title bar geometry in desktop Progressive Web Apps that use the Window Controls Overlay API.
no setter

Methods

canShare([ShareData data]) bool
The canShare() method of the Navigator interface returns true if the equivalent call to navigator.share would succeed.
clearAppBadge() JSPromise<JSAny?>
The clearAppBadge() method of the Navigator interface clears a badge on the current app's icon by setting it to nothing. The value nothing indicates that no badge is currently set, and the status of the badge is cleared.
getBattery() JSPromise<BatteryManager>
The getBattery() method provides information about the system's battery. It returns a battery promise, which resolves with a BatteryManager object providing some properties to get the battery status also some events you can handle to monitor the battery status. This implements the Battery Status API; see that documentation for additional details, a guide to using the API, and sample code.
getGamepads() JSArray<Gamepad?>
The Navigator.getGamepads() method returns an array of Gamepad objects, one for each gamepad connected to the device.
javaEnabled() bool
This method always returns false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerProtocolHandler(String scheme, String url) → void
The Navigator method registerProtocolHandler() lets websites register their ability to open or handle particular URL schemes (aka protocols).
requestMediaKeySystemAccess(String keySystem, JSArray<MediaKeySystemConfiguration> supportedConfigurations) JSPromise<MediaKeySystemAccess>
The requestMediaKeySystemAccess() method of the Navigator interface returns a Promise which delivers a MediaKeySystemAccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream.
requestMIDIAccess([MIDIOptions options]) JSPromise<MIDIAccess>
The requestMIDIAccess() method of the Navigator interface returns a Promise representing a request for access to MIDI devices on a user's system. This method is part of the Web MIDI API, which provides a means for accessing, enumerating, and manipulating MIDI devices.
sendBeacon(String url, [BodyInit? data]) bool
The navigator.sendBeacon() method sends an HTTP POST request containing a small amount of data to a web server.
setAppBadge([int contents]) JSPromise<JSAny?>
The setAppBadge() method of the Navigator interface sets a badge on the icon associated with this app. If a value is passed to the method, this will be set as the value of the badge. Otherwise the badge will display as a dot, or other indicator as defined by the platform.
share([ShareData data]) JSPromise<JSAny?>
The share() method of the Navigator interface invokes the native sharing mechanism of the device to share data such as text, URLs, or files. The available share targets depend on the device, but might include the clipboard, contacts and email applications, websites, Bluetooth, etc.
taintEnabled() bool
The Navigator.taintEnabled() method always returns false.
toString() String
A string representation of this object.
inherited
unregisterProtocolHandler(String scheme, String url) → void
The Navigator method unregisterProtocolHandler() removes a protocol handler for a given URL scheme.
vibrate(VibratePattern pattern) bool
The vibrate() method of the Navigator interface pulses the vibration hardware on the device, if such hardware exists. If the device doesn't support vibration, this method has no effect. If a vibration pattern is already in progress when this method is called, the previous pattern is halted and the new one begins instead.

Operators

operator ==(Object other) bool
The equality operator.
inherited