W3cubDocs

/Haxe JavaScript

Navigator

package js.html

@:native("Navigator") Available on js

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.

Documentation Navigator by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Variables

read only appCodeName:String

read only appName:String

read only appVersion:String

read only battery:BatteryManager

Returns a BatteryManager object you can use to get information about the battery charging status.

read only buildID:String

read only cookieEnabled:Bool

Returns a boolean indicating whether cookies are enabled in the browser or not.

read only doNotTrack:String

Reports the value of the user's do-not-track preference. When this value is "yes", your web site or application should not track the user.

read only geolocation:Geolocation

Returns a Geolocation object allowing accessing the location of the device.

read only hardwareConcurrency:Int

read only language:String

read only languages:Array<String>

read only maxTouchPoints:Int

read only mimeTypes:MimeTypeArray

read only onLine:Bool

read only oscpu:String

Returns a string that represents the current operating system.

read only permissions:Permissions

Returns a Permissions object that can be used to query and update permission status of APIs covered by the Permissions API.

read only platform:String

read only plugins:PluginArray

read only product:String

read only productSub:String

Returns the build number of the current browser (e.g., "20060909").

read only userAgent:String

read only vendor:String

Returns the vendor name of the current browser (e.g., "Netscape6").

read only vendorSub:String

Returns the vendor version number (e.g. "6.1").

Methods

getBattery ():Promise<BatteryManager>

Throws:

null DOMError

getGamepads ():Array<Gamepad>

Throws:

null DOMError

javaEnabled ():Bool

Throws:

null DOMError

registerContentHandler (mimeType:String, url:String, title:String):Void

Throws:

null DOMError

registerProtocolHandler (scheme:String, url:String, title:String):Void

Throws:

null DOMError

sendBeacon (url:String, ?data:EitherType<ArrayBufferView, EitherType<Blob, EitherType<String, FormData>>>):Bool

Throws:

null DOMError

taintEnabled ():Bool

vibrate (pattern:Array<Int>):Bool

vibrate (duration:Int):Bool

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Navigator.html