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
WorkerGlobalScope.navigator
property obtained by calling
window.self.navigator
.
WorkerNavigator
interface implements properties from the
NavigatorID
,
NavigatorLanguage
,
NavigatorOnLine
,
NavigatorDataStore
,和
NavigatorConcurrentHardware
接口。
WorkerNavigator.connection
只读
NetworkInformation
object containing information about the network connection of a device.
WorkerNavigator.locks
只读
LockManager
object which provides methods for requesting a new
锁
object and querying for an existing
锁
对象。
WorkerNavigator.permissions
只读
权限
object that can be used to query and update permission status of APIs covered by the
权限 API
.
Navigator.storage
只读
StorageManager
interface for managing persistance permissions and estimating available storage.
NavigatorID.appCodeName
只读
'Mozilla'
, in any browser. This property is kept only for compatibility purposes.
NavigatorID.appName
只读
Returns the official name of the browser. Do not rely on this property to return the correct value.
NavigatorID.appVersion
只读
Returns the version of the browser as a string. Do not rely on this property to return the correct value.
NavigatorConcurrentHardware.hardwareConcurrency
只读
Returns the number of logical processor cores available.
NavigatorLanguage.language
只读
DOMString
representing the language version of the browser. The
null
value is returned when this is unknown.
NavigatorLanguage.languages
只读
DOMString
s representing the languages known to the user, in order of preference.
NavigatorOnLine.onLine
只读
布尔
indicating whether the browser is online.
NavigatorID.platform
只读
Returns a string representing the platform of the browser. Do not rely on this property to return the correct value.
NavigatorID.product
只读
'Gecko'
, on any browser. This property is kept only for compatibility purposes.
NavigatorID.userAgent
只读
Returns the user agent string for the current browser.
WorkerNavigator
interface implements methods from the
NavigatorID
,
NavigatorLanguage
and
NavigatorOnLine
接口。
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'WorkerNavigator' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
WorkerNavigator
|
Chrome 1 | Edge ≤79 | Firefox 3.5 | IE ? | Opera Yes | Safari ? | WebView Android Yes | Chrome Android Yes | Firefox Android 4 | Opera Android Yes | Safari iOS ? | Samsung Internet Android Yes |
connection
|
Chrome 61 | Edge ≤79 | Firefox No | IE No | Opera Yes | Safari No | WebView Android 50 | Chrome Android 38 | Firefox Android 53 | Opera Android 37 | Safari iOS No | Samsung Internet Android 3.0 |
permissions
|
Chrome 43 | Edge ≤79 | Firefox No | IE ? | Opera 30 | Safari No | WebView Android 43 | Chrome Android 43 | Firefox Android No | Opera Android 30 | Safari iOS No | Samsung Internet Android 4.0 |
serviceWorker
|
Chrome ? | Edge ? | Firefox ? | IE ? | Opera ? | Safari ? | WebView Android ? | Chrome Android ? | Firefox Android ? | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
完整支持
不支持
兼容性未知
实验。期望将来行为有所改变。
Worker
,
WorkerLocation
,和
WorkerGlobalScope
.