src/aria/core/Browser.js
function(userAgent) {
            var userAgentWrapper = UserAgent.getUserAgentInfo(userAgent);

            // ----------------------------------------- reset /apply properties

            this._resetProperties();

            var properties = this._getProperties(userAgentWrapper);
            this._import(properties);

            /* BACKWARD-COMPATIBILITY-BEGIN (GitHub #1397) */
            this.__ensureDeprecatedProperties();
            /* BACKWARD-COMPATIBILITY-END (GitHub #1397) */

            // ---------------------------------------------------------- return

            return userAgentWrapper;
        }
function(userAgent) {
            var userAgentWrapper = UserAgent.getUserAgentInfo(userAgent);

            // ----------------------------------------- reset /apply properties

            this._resetProperties();

            var properties = this._getProperties(userAgentWrapper);
            this._import(properties);

            /* BACKWARD-COMPATIBILITY-BEGIN (GitHub #1397) */
            this.__ensureDeprecatedProperties();
            /* BACKWARD-COMPATIBILITY-END (GitHub #1397) */

            // ---------------------------------------------------------- return

            return userAgentWrapper;
        }
function ( userAgent ) { var userAgentWrapper = UserAgent . getUserAgentInfo ( userAgent ) ; // ----------------------------------------- reset /apply properties this . _resetProperties ( ) ; var properties = this . _getProperties ( userAgentWrapper ) ; this . _import ( properties ) ; /* BACKWARD-COMPATIBILITY-BEGIN (GitHub #1397) */ this . __ensureDeprecatedProperties ( ) ; /* BACKWARD-COMPATIBILITY-END (GitHub #1397) */ // ---------------------------------------------------------- return return userAgentWrapper ; }
Makes the class work with the given user agent.

<p>
If no user agent is given, current browser's one is taken.
</p>

<p>
Not that providing a user agent different than the running browser's one will not make all functions return values corresponding to the browser associated to this custom user agent. Feature detection mechanism for instance will by nature always correspond to the running browser.
</p>

@param {String} userAgent The user agent to take into account in this class

@return {Object} The user agent wrapper used to compute the properties (see <em>aria.core.useragent.UserAgent.getUserAgentInfo</em>)
Makes the class work with the given user agent .