Package muntjac :: Package terminal :: Package gwt :: Package client :: Module v_browser_details :: Class VBrowserDetails
[hide private]
[frames] | no frames]

Class VBrowserDetails

source code

object --+
         |
        VBrowserDetails

Class that parses the user agent string from the browser and provides information about the browser. Used internally by BrowserInfo and WebBrowser. Should not be used directly.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
__init__(self, userAgent)
Create an instance based on the given user agent.
source code
 
parseVersionString(self, versionString) source code
 
safeSubstring(self, string, beginIndex, endIndex) source code
 
isFirefox(self)
Tests if the browser is Firefox.
source code
 
isGecko(self)
Tests if the browser is using the Gecko engine
source code
 
isWebKit(self)
Tests if the browser is using the WebKit engine
source code
 
isPresto(self)
Tests if the browser is using the Presto engine
source code
 
isSafari(self)
Tests if the browser is Safari.
source code
 
isChrome(self)
Tests if the browser is Chrome.
source code
 
isOpera(self)
Tests if the browser is Opera.
source code
 
isIE(self)
Tests if the browser is Internet Explorer.
source code
 
getBrowserEngineVersion(self)
Returns the version of the browser engine.
source code
 
getBrowserMajorVersion(self)
Returns the browser major version e.g., 3 for Firefox 3.5, 4 for Chrome 4, 8 for Internet Explorer 8.
source code
 
getBrowserMinorVersion(self)
Returns the browser minor version e.g., 5 for Firefox 3.5.
source code
 
setIEMode(self, documentMode)
Sets the version for IE based on the documentMode.
source code
 
isWindows(self)
Tests if the browser is run on Windows.
source code
 
isMacOSX(self)
Tests if the browser is run on Mac OSX.
source code
 
isLinux(self)
Tests if the browser is run on Linux.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, userAgent)
(Constructor)

source code 

Create an instance based on the given user agent.

Parameters:
  • userAgent - User agent as provided by the browser.
Overrides: object.__init__

isFirefox(self)

source code 

Tests if the browser is Firefox.

Returns:
true if it is Firefox, false otherwise

isGecko(self)

source code 

Tests if the browser is using the Gecko engine

Returns:
true if it is Gecko, false otherwise

isWebKit(self)

source code 

Tests if the browser is using the WebKit engine

Returns:
true if it is WebKit, false otherwise

isPresto(self)

source code 

Tests if the browser is using the Presto engine

Returns:
true if it is Presto, false otherwise

isSafari(self)

source code 

Tests if the browser is Safari.

Returns:
true if it is Safari, false otherwise

isChrome(self)

source code 

Tests if the browser is Chrome.

Returns:
true if it is Chrome, false otherwise

isOpera(self)

source code 

Tests if the browser is Opera.

Returns:
true if it is Opera, false otherwise

isIE(self)

source code 

Tests if the browser is Internet Explorer.

Returns:
true if it is Internet Explorer, false otherwise

getBrowserEngineVersion(self)

source code 

Returns the version of the browser engine. For WebKit this is an integer e.g., 532.0. For gecko it is a float e.g., 1.8 or 1.9.

Returns:
The version of the browser engine

getBrowserMajorVersion(self)

source code 

Returns the browser major version e.g., 3 for Firefox 3.5, 4 for Chrome 4, 8 for Internet Explorer 8.

Note that Internet Explorer 8 and newer will return the document mode so IE8 rendering as IE7 will return 7.

Returns:
The major version of the browser.

getBrowserMinorVersion(self)

source code 

Returns the browser minor version e.g., 5 for Firefox 3.5.

Returns:
The minor version of the browser, or -1 if not known/parsed.

See Also: #getBrowserMajorVersion()

setIEMode(self, documentMode)

source code 

Sets the version for IE based on the documentMode. This is used to return the correct the correct IE version when the version from the user agent string and the value of the documentMode property do not match.

Parameters:
  • documentMode - The current document mode

isWindows(self)

source code 

Tests if the browser is run on Windows.

Returns:
true if run on Windows, false otherwise

isMacOSX(self)

source code 

Tests if the browser is run on Mac OSX.

Returns:
true if run on Mac OSX, false otherwise

isLinux(self)

source code 

Tests if the browser is run on Linux.

Returns:
true if run on Linux, false otherwise