All samples are using Ink.requireModules, please read how to use it at Ink.requireModules section

Ink.Dom.Browser namespace

Functions
Function name Description
.debug() Debug function which displays browser (and Ink.Dom.Browser) information as an alert message.
.detectBrowser() Detects the browser and stores the found properties. Called automatically when this module is loaded.
.init() Initialization function for the Browser object.
.setDimensions() Retrieves and stores window dimensions in this object. Called automatically when this module is loaded.
.setReferrer() Stores the referrer. Called automatically when this module is loaded.
Properties
Property name Description
.CHROME True if browser is Chrome
.GECKO True if the browser is Gecko based
.IE True if the browser is Internet Explorer
.KONQUEROR True if the browser is Konqueror
.OPERA True if the browser is Opera
.SAFARI True if the browser is Safari
.cssPrefix The CSS prefix (-moz-, -webkit-, -ms-, ...)
.domPrefix The DOM prefix (Moz, Webkit, ms, ...)
.model The specific browser model.
.userAgent The user agent string.
.version The browser version.

.debug() method

Debug function which displays browser (and Ink.Dom.Browser) information as an alert message.

Code

Ink.requireModules(['Ink.Dom.Browser_1'], function (Browser) {
    Browser.debug();
    // known browsers: (ie, gecko, opera, safari, konqueror) 
    // false,true,false,false,false
    // cssPrefix -> -moz-
    // domPrefix -> Moz
    // model -> firefox
    // version -> 28.0
    //
    // original UA -> Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:28.0) Gecko/20100101 Firefox/28.0 
});

.detectBrowser() method

Detects the browser and stores the found properties. Called automatically when this module is loaded.

.init() method

Initialization function for the Browser object.

Is called automatically when this module is loaded, and calls setDimensions, setBrowser and setReferrer.

.setDimensions() method

Retrieves and stores window dimensions in this object. Called automatically when this module is loaded.

.setReferrer() method

Stores the referrer. Called automatically when this module is loaded.

Ink.Dom.Browser.CHROME attribute

Boolean

True if browser is Chrome

Ink.Dom.Browser.GECKO attribute

Boolean

True if the browser is Gecko based

Ink.Dom.Browser.IE attribute

Boolean

True if the browser is Internet Explorer

Ink.Dom.Browser.KONQUEROR attribute

Boolean

True if the browser is Konqueror

Ink.Dom.Browser.OPERA attribute

Boolean

True if the browser is Opera

Ink.Dom.Browser.SAFARI attribute

Boolean

True if the browser is Safari

Ink.Dom.Browser.cssPrefix attribute

Boolean|String

The CSS prefix (-moz-, -webkit-, -ms-, ...)
False if it is unavailable

Ink.Dom.Browser.domPrefix attribute

Boolean|String

The DOM prefix (Moz, Webkit, ms, ...)
False if it is unavailable

Ink.Dom.Browser.model attribute

Boolean|String

The specific browser model.
False if it is unavailable.

Ink.Dom.Browser.userAgent attribute

Boolean|String

The user agent string.
False if it is unavailable.

Ink.Dom.Browser.version attribute

Boolean|String

The browser version.
False if it is unavailable.