namespace bot.userAgent

Functions

isEngineVersion(version)code »

Whether the rendering engine version of the current browser is equal to or greater than the given version. This implementation differs from goog.userAgent.isVersion in the following ways:

  1. in a Firefox extension, tests the engine version through the XUL version comparator service, because no window.navigator object is available
  2. in IE, compares the given version to the current documentMode
Parameters
version(string|number)

The version number to check.

Returns
boolean

Whether the browser engine version is the same or higher than the given version.


isProductVersion(version)code »

Whether the product version of the current browser is equal to or greater than the given version. This implementation differs from goog.userAgent.product.isVersion in the following ways:

  1. in a Firefox extension, tests the product version through the XUL version comparator service, because no window.navigator object is available
  2. on Android, always compares to the version to the OS version
Parameters
version(string|number)

The version number to check.

Returns
boolean

Whether the browser product version is the same or higher than the given version.

Properties

ANDROID_PRE_GINGERBREADboolean

Whether the current browser is Android pre-gingerbread.

ANDROID_PRE_ICECREAMSANDWICHboolean

Whether the current browser is Android pre-icecreamsandwich

FIREFOX_EXTENSIONboolean

Whether we are in a Firefox extension.

IE_DOC_10boolean

Whether the current document is IE in IE10 (or newer) standards mode.

IE_DOC_9boolean

Whether the current document is IE in IE9 (or newer) standards mode.

IE_DOC_PRE10boolean

Whether the current document is IE in a documentMode older than 10.

IE_DOC_PRE8boolean

Whether the current document is IE in a documentMode older than 8.

IE_DOC_PRE9boolean

Whether the current document is IE in a documentMode older than 9.

IOSboolean

Whether we are on IOS.

MOBILEboolean

Whether we are on a mobile browser.

SAFARI_6boolean

Whether the current browser is Safari 6.

WINDOWS_PHONEboolean

Whether the current browser is Windows Phone.