public class WebBrowser extends Object implements Serializable
Constructor and Description |
---|
WebBrowser() |
Modifier and Type | Method and Description |
---|---|
String |
getAddress()
Gets the IP-address of the web browser, if available.
|
String |
getBrowserApplication()
Get the browser user-agent string.
|
int |
getBrowserMajorVersion()
Gets the major version of the browser the user is using.
|
int |
getBrowserMinorVersion()
Gets the minor version of the browser the user is using.
|
Locale |
getLocale()
Gets the locale reported by the browser.
|
boolean |
isAndroid()
Tests if the browser is run on Android.
|
boolean |
isChrome()
Tests whether the user is using Chrome.
|
boolean |
isChromeOS()
Tests if the browser is run on ChromeOS (e.g.
|
boolean |
isEdge()
Tests whether the user is using Edge.
|
boolean |
isEs5AdapterNeeded()
Checks if the browser needs `custom-elements-es5-adapter.js` to be
loaded.
|
boolean |
isEs6Supported()
Checks if the browser supports ECMAScript 6, based on the user agent.
|
boolean |
isFirefox()
Tests whether the user is using Firefox.
|
boolean |
isIE()
Tests whether the user is using Internet Explorer.
|
boolean |
isIOS()
Deprecated.
isIOS will return the wrong value for iOS 13 and later. Use
instead
ExtendedClientDetails.isIOS() |
boolean |
isIPad()
Deprecated.
isIPad will return the wrong value for iOS 13 and later. Use
instead
ExtendedClientDetails.isIPad() |
boolean |
isIPhone()
Tests if the browser is run on IPhone.
|
boolean |
isLinux()
Tests whether the user is using Linux.
|
boolean |
isMacOSX()
Tests whether the user is using Mac OS X.
|
boolean |
isOpera()
Tests whether the user is using Opera.
|
boolean |
isSafari()
Tests whether the user is using Safari.
|
boolean |
isSecureConnection()
Checks if the connection was established using HTTPS.
|
boolean |
isTooOldToFunctionProperly()
Checks if the browser is so old that it simply won't work with a Vaadin
application.
|
boolean |
isWindows()
Tests whether the user is using Windows.
|
boolean |
isWindowsPhone()
Tests whether the user is using Windows Phone.
|
void |
updateRequestDetails(VaadinRequest request)
For internal use only.
|
public String getBrowserApplication()
public String getAddress()
public Locale getLocale()
public boolean isSecureConnection()
public boolean isFirefox()
public boolean isIE()
public boolean isEdge()
public boolean isSafari()
public boolean isOpera()
public boolean isChrome()
public int getBrowserMajorVersion()
Note that Internet Explorer in IE7 compatibility mode might return 8 in some cases even though it should return 7.
public int getBrowserMinorVersion()
getBrowserMajorVersion()
public boolean isLinux()
public boolean isMacOSX()
public boolean isWindows()
public boolean isWindowsPhone()
public boolean isAndroid()
@Deprecated public boolean isIOS()
ExtendedClientDetails.isIOS()
public boolean isIPhone()
@Deprecated public boolean isIPad()
ExtendedClientDetails.isIPad()
public boolean isChromeOS()
public void updateRequestDetails(VaadinRequest request)
request
- the Vaadin request to read the information frompublic boolean isTooOldToFunctionProperly()
public boolean isEs6Supported()
true
if the browser supports ES6, false
otherwise.public boolean isEs5AdapterNeeded()
true
if the browser needs the adapter,
false
otherwise.Copyright © 2020. All rights reserved.