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.
Doesn't inherit any properties, but implements those defined in NavigatorID
, NavigatorLanguage
, NavigatorOnLine
, NavigatorContentUtils
, NavigatorStorage
, NavigatorStorageUtils
, NavigatorCookies
, NavigatorConcurrentHardware
, NavigatorPlugins
, and NavigatorUserMedia
.
Navigator.activeVRDisplays
Read only
VRDisplay
object that is currently presenting (VRDisplay.ispresenting
is true
).NavigatorID.appCodeName
Read only
NavigatorID.appName
Read only
DOMString
with the official name of the browser. Do not rely on this property to return the correct value.NavigatorID.appVersion
Read only
DOMString
. Do not rely on this property to return the correct value.Navigator.battery
Read only
BatteryManager
object you can use to get information about the battery charging status.Navigator.connection
Read only
NetworkInformation
object containing information about the network connection of a device.Navigator.geolocation
Read only
Geolocation
object allowing accessing the location of the device.NavigatorConcurrentHardware.hardwareConcurrency
Read only
NavigatorPlugins.javaEnabled
Read only
Boolean
flag indicating whether the host browser is Java-enabled or not.NavigatorLanguage.language
Read only
DOMString
representing the preferred language of the user, usually the language of the browser UI. The null
value is returned when this is unknown.NavigatorLanguage.languages
Read only
DOMString
representing the languages known to the user, by order of preference.NavigatorPlugins.mimeTypes
Read only
MimeTypeArray
listing the MIME types supported by the browser.NavigatorOnLine.onLine
Read only
Boolean
indicating whether the browser is working online.Navigator.oscpu
Navigator.permissions
Read only
Permissions
object that can be used to query and update permission status of APIs covered by the Permissions API.NavigatorID.platform
Read only
NavigatorPlugins.plugins
Read only
PluginArray
listing the plugins installed in the browser.NavigatorID.product
Read only
'Gecko'
, on any browser. This property is kept only for compatibility purpose.Navigator.serviceWorker
Read only
ServiceWorkerContainer
object, which provides access to registration, removal, upgrade, and communication with the ServiceWorker
objects for the associated document.Navigator.storage
Read only
StorageManager
object used for managing persistance permissions and estimating available storage on a site-by-site/app-by-app basis.NavigatorID.userAgent
Read only
Firefox OS devices adds more non-standard properties. You can consult them on the Firefox OS Navigator extensions article.
Navigator.cookieEnabled
Navigator.credentials
CredentialsContainer
interface which exposes methods to request credentials and notify the user agent when interesting events occur such as successful sign in or sign out. Navigator.doNotTrack
Navigator.id
id
object which you can use to add support for BrowserID to your web site.Navigator.mediaDevices
MediaDevices
object which can then be used to get information about available media devices (MediaDevices.enumerateDevices()
), find out what constrainable properties are supported for media on the user's computer and user agent (MediaDevices.getSupportedConstraints()
), and to request access to media using MediaDevices.getUserMedia()
.Navigator.mozNotification
Deprecated since Gecko 22 Navigator.webkitNotification
notification
object you can use to deliver notifications to the user from your web application.Navigator.mozSocial
navigator.mozSocial
property, is available within the social media provider's panel to provide functionality it may need.Navigator.presentation
Presentation
API.Navigator.productSub
Navigator.securitypolicy
Navigator.standalone
Navigator.storageQuota
Read only
StorageQuota
interface which provides means to query and request storage usage and quota information.Navigator.vendor
Navigator.vendorSub
Navigator.webkitPointer
Doesn't inherit any method, but implements those defined in NavigatorID
, NavigatorContentUtils
, NavigatorUserMedia
, and NavigatorStorageUtils
.
Navigator.getVRDisplays()
VRDisplay
objects representing any available VR devices connected to the computer.Navigator.getUserMedia()
Navigator.registerContentHandler()
Navigator.registerProtocolHandler()
Navigator.requestMediaKeySystemAccess()
Promise
for a MediaKeySystemAccess object.
Navigator.sendBeacon()
NavigatorID.taintEnabled()
Deprecated since Gecko 1.7.8 Obsolete since Gecko 9.0
false
. JavaScript taint/untaint functions removed in JavaScript 1.2.Navigator.vibrate()
Firefox OS devices adds more non-standard methods. You can consult them on the Firefox OS Navigator extensions article.
Navigator.mozIsLocallyAvailable()
Navigator.mozPay()
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/navigator