Class BaseNavigator


  • @JsType(isNative=true,
            name="Navigator",
            namespace="<global>")
    public final class BaseNavigator
    extends Object
    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.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • getLanguage

        @JsProperty
        public final String getLanguage()
        Returns a string representing the preferred language of the user, usually the language of the browser UI.
        Returns:
        a string representing the preferred language of the user, usually the language of the browser UI
      • getUserAgent

        @JsProperty
        public final String getUserAgent()
        Returns the user agent string for the current browser.
        Browser identification based on detecting the user agent string is unreliable and is not recommended, as the user agent string is user configurable.
        Returns:
        the user agent string for the current browser