The Core.Web.Env
object provides data regarding the client browser environment. Upon initialization of the Core.Web
module, the client browser and version will be determined. Quirk Flags are set to indicate various specific issues that are present in the current browser, such that developers can write workarounds which will only be enabled when the client requires them.
All environment flags are stored directly in the Core.Web.Env
object, such that they may be queried directly. For example, if the developer needs to determine if a Mozilla-based browser is in use, it can be determined by whether Core.Web.Env.BROWSER_MOZILLA
evaluates to true
.
The following client browser flags are available:
BROWSER_MOZILLA
: true for all Mozilla-based (Gecko-based) browsers, including Firefox and Camino.BROWSER_FIREFOX
: true for Mozilla's Firefox browser.BROWSER_SAFARI
: true for Apple's Safari browser.BROWSER_INTERNET_EXPLORER
: true for Microsoft Internet Explorer browsers.BROWSER_KONQUEROR
: true for the Konqueror (KDE) browser.BROWSER_OPERA
: true for the Opera browser.BROWSER_CHROME
: true for the Google's Chrome browser.Additionally, the BROWSER_MAJOR_VERSION
and BROWSER_MINOR_VERSION
values indicate the major and minor versions of the browser, respectively.