Package org.pepstock.charba.client.dom
Class BaseNavigator
- java.lang.Object
-
- org.pepstock.charba.client.dom.BaseNavigator
-
@JsType(isNative=true, name="Navigator", namespace="<global>") public final class BaseNavigator extends ObjectRepresents 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLanguage()Returns a string representing the preferred language of the user, usually the language of the browser UI.StringgetUserAgent()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.
-
-
-
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
-
-