Class

org.scalajs.dom

Navigator

Related Doc: package dom

Permalink

class Navigator extends Object with NavigatorID with NavigatorOnLine with NavigatorContentUtils with NavigatorGeolocation with NavigatorStorageUtils with NavigatorLanguage with NavigatorLocks with NavigatorVibration

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.

Annotations
@JSType() @native() @JSGlobal()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Navigator
  2. NavigatorVibration
  3. NavigatorLocks
  4. NavigatorLanguage
  5. NavigatorStorageUtils
  6. NavigatorGeolocation
  7. NavigatorContentUtils
  8. NavigatorOnLine
  9. NavigatorID
  10. Object
  11. Any
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Navigator()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def appName: String

    Permalink

    Returns the name of the browser.

    Returns the name of the browser. The HTML5 specification also allows any browser to return "Netscape" here, for compatibility reasons.

    Definition Classes
    NavigatorID
  5. def appVersion: String

    Permalink

    Returns the version of the browser as a string.

    Returns the version of the browser as a string. It may be either a plain version number, like "5.0", or a version number followed by more detailed information. The HTML5 specification also allows any browser to return "4.0" here, for compatibility reasons.

    Definition Classes
    NavigatorID
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clipboard: Clipboard

    Permalink

    The Clipboard API adds to the Navigator interface the read-only clipboard property, which returns the Clipboard object used to read and write the clipboard's contents.

    The Clipboard API adds to the Navigator interface the read-only clipboard property, which returns the Clipboard object used to read and write the clipboard's contents. The Clipboard API can be used to implement cut, copy, and paste features within a web application.

    Use of the asynchronous clipboard read and write methods requires that the user grant the web site or app permission to access the clipboard. This permission must be obtained from the Permissions API using the "clipboard-read" and/or "clipboard-write" permissions.

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def geolocation: Geolocation

    Permalink

    The NavigatorGeolocation.geolocation read-only property returns a Geolocation object that gives Web content access to the location of the device.

    The NavigatorGeolocation.geolocation read-only property returns a Geolocation object that gives Web content access to the location of the device. This allows a Web site or app offer customized results based on the user's location.

    Definition Classes
    NavigatorGeolocation
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getGamepads(): Array[Gamepad]

    Permalink

    Implements the Gamepad API.

    Implements the Gamepad API.

    W3C Working Draft

  15. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  19. def language: String

    Permalink

    Returns a DOMString representing the preferred language of the user, usually the language of the browser UI.

    Returns a DOMString representing the preferred language of the user, usually the language of the browser UI. The null value is returned when this is unknown.

    Definition Classes
    NavigatorLanguage
  20. def languages: Array[String]

    Permalink

    Returns a Array of DOMStrings representing the the user's preferred languages.

    Returns a Array of DOMStrings representing the the user's preferred languages. The language is described using BCP 47 language tags. The null value is returned when this is unknown.

    Definition Classes
    NavigatorLanguage
  21. def locks: LockManager

    Permalink

    A LockManager object which provides methods for requesting a new Lock object and querying for an existing Lock object.

    A LockManager object which provides methods for requesting a new Lock object and querying for an existing Lock object.

    Definition Classes
    NavigatorLocks
  22. def mediaDevices: MediaDevices

    Permalink

    The Navigator.mediaDevices read-only property returns a MediaDevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.

    The Navigator.mediaDevices read-only property returns a MediaDevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.

    See also

    https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaDevices

  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def onLine: Boolean

    Permalink

    Returns the online status of the browser.

    Returns the online status of the browser. The property returns a boolean value, with true for being online and false for being 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.

    Definition Classes
    NavigatorOnLine
  27. val permissions: Permissions

    Permalink
  28. def platform: String

    Permalink

    Returns a string representing the platform of the browser.

    Returns a string representing the platform of the browser.

    Definition Classes
    NavigatorID
  29. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  30. def registerProtocolHandler(scheme: String, url: URL): Unit

    Permalink
    Definition Classes
    NavigatorContentUtils
  31. def registerProtocolHandler(scheme: String, url: String): Unit

    Permalink

    The Navigator method registerProtocolHandler() lets websites register their ability to open or handle particular URL schemes (aka protocols).

    The Navigator method registerProtocolHandler() lets websites register their ability to open or handle particular URL schemes (aka protocols).

    For example, this API lets webmail sites open mailto: URLs, or VoIP sites open tel: URLs.

    scheme

    A string containing the permitted scheme for the protocol that the site wishes to handle. For example, you can register to handle SMS text message links by passing the "sms" scheme.

    url

    A string containing the URL of the handler. This URL must include %s, as a placeholder that will be replaced with the escaped URL to be handled.

    returns

    undefined

    Definition Classes
    NavigatorContentUtils
    Exceptions thrown

    The user agent blocked the registration. This might happen if:

    • The registered scheme (protocol) is invalid, such as a scheme the browser handles itself (https:, about:, etc.)
    • The handler URL's origin does not match the origin of the page calling this API.
    • The browser requires that this function is called from a secure context.
    • The browser requires that the handler's URL be over HTTPS.

    DOMException.SYNTAX_ERR The %s placeholder is missing from the handler URL

    See also

    https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler

  32. def sendBeacon(url: String, data: BodyInit = js.native): Boolean

    Permalink

    The navigator.sendBeacon() method can be used to asynchronously transfer small HTTP data from the User Agent to a web server.

    The navigator.sendBeacon() method can be used to asynchronously transfer small HTTP data from the User Agent to a web server.

    url

    The url parameter indicates the resolved URL where the data is to be transmitted.

    data

    The data parameter is the ArrayBufferView, Blob, DOMString, or FormData data that is to be transmitted.

  33. val serviceWorker: ServiceWorkerContainer

    Permalink

    The Navigator.serviceWorker read-only property returns a ServiceWorkerContainer object, which provides access to registration, removal, upgrade, and communication with the ServiceWorker objects for the associated document.

  34. def storage: StorageManager

    Permalink

    https://storage.spec.whatwg.org/

  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  36. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  37. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  38. def unregisterProtocolHandler(scheme: String, url: URL): Unit

    Permalink
    Definition Classes
    NavigatorContentUtils
  39. def unregisterProtocolHandler(scheme: String, url: String): Unit

    Permalink

    The Navigator method unregisterProtocolHandler() removes a protocol handler for a given URL scheme.

    The Navigator method unregisterProtocolHandler() removes a protocol handler for a given URL scheme.

    This method is the inverse of registerProtocolHandler().

    scheme

    A string containing the permitted scheme in the protocol handler that will be unregistered. For example, you can unregister the handler for SMS text message links by passing the "sms" scheme.

    url

    A string containing the URL of the handler. This URL should match the one that was used to register the handler (e.g. it must include %s).

    returns

    undefined

    Definition Classes
    NavigatorContentUtils
    Exceptions thrown

    The user agent blocked unregistration. This might happen if:

    • The registered scheme (protocol) is invalid, such as a scheme the browser handles itself (https:, about:, etc.)
    • The handler URL's origin does not match the origin of the page calling this API.
    • The browser requires that this function is called from a secure context.
    • The browser requires that the handler's URL be over HTTPS.

    DOMException.SYNTAX_ERR The %s placeholder is missing from the handler URL

    See also

    https://developer.mozilla.org/en-US/docs/Web/API/Navigator/unregisterProtocolHandler

  40. def userAgent: String

    Permalink

    Returns the user agent string for the current browser.

    Returns the user agent string for the current browser.

    Definition Classes
    NavigatorID
  41. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  42. def vibrate(pattern: Array[Double]): Boolean

    Permalink

    Vibrate the device in the given pattern.

    Vibrate the device in the given pattern.

    pattern

    the pattern to vibrate. The first number is the initial duration, the subsequent a delay of silence, and so on.

    Definition Classes
    NavigatorVibration
  43. def vibrate(duration: Double): Boolean

    Permalink

    Vibrate the device for the specified number of milliseconds.

    Vibrate the device for the specified number of milliseconds.

    Definition Classes
    NavigatorVibration
  44. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from NavigatorVibration

Inherited from NavigatorLocks

Inherited from NavigatorLanguage

Inherited from NavigatorStorageUtils

Inherited from NavigatorGeolocation

Inherited from NavigatorContentUtils

Inherited from NavigatorOnLine

Inherited from NavigatorID

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped