For up to date documentation and features, visit http://docs.sencha.com/ext-js/4-0

## Sencha Documentation

# Ext.env.Browser

####

    HierarchyExt.BaseExt.env.Browser

Provide useful information about the current browser. Should not be manually instantiated unless for unit-testing; access the global instance stored in Ext.browser instead. Example:

    if (Ext.browser.is.IE) {
         // IE specific code here
    }

    if (Ext.browser.is.WebKit) {
         // WebKit specific code here
    }

    console.log("Version " + Ext.browser.version);

For a full list of supported values, refer to: is

@borrows Ext.Base.extend

Defined By

### Properties

Ext.Base
view source
addStatics : Function
Add / override static properties of this class. Ext.define('My.cool.Class', { ... }); My.cool.Class.addStatics(...

Add / override static properties of this class.

    Ext.define('My.cool.Class', {
        ...
    });

    My.cool.Class.addStatics({
        someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'
        method1: function() { ... },    // My.cool.Class.method1 = function() { ... };
        method2: function() { ... }     // My.cool.Class.method2 = function() { ... };
    });

Ext.Base
view source
borrow : Function
Borrow another class' members to the prototype of this class. Ext.define('Bank', { money: '$$$', printMoney: functi...

Borrow another class' members to the prototype of this class.

Ext.define('Bank', {

    money: '$$$',
    printMoney: function() {
        alert('$$$$$$$');
    }

});

Ext.define('Thief', {

    ...

});

Thief.borrow(Bank, ['money', 'printMoney']);

var steve = new Thief();

alert(steve.money); // alerts '$$$' steve.printMoney(); // alerts '$$$$$$$'

Ext.Base
view source
create : Function
Create a new instance of this Class. Ext.define('My.cool.Class', { ... }); My.cool.Class.create({ someConfig: tr...

Create a new instance of this Class. Ext.define('My.cool.Class', {

    ...

});

My.cool.Class.create({

    someConfig: true

});

Ext.Base
view source
createAlias : Function
Create aliases for existing prototype methods. Example: Ext.define('My.cool.Class', { method1: function() { ... ...

Create aliases for existing prototype methods. Example:

    Ext.define('My.cool.Class', {
        method1: function() { ... },
        method2: function() { ... }
    });

    var test = new My.cool.Class();

    My.cool.Class.createAlias({
        method3: 'method1',
        method4: 'method2'
    });

    test.method3(); // test.method1()

    My.cool.Class.createAlias('method5', 'method3');

    test.method5(); // test.method3() -> test.method1()

Ext.env.Browser
view source
engineName : String

Read-only - the full name of the current browser's engine Possible values are: WebKit, Gecko, Presto, Trident and Other

Read-only - the full name of the current browser's engine Possible values are: WebKit, Gecko, Presto, Trident and Other

Ext.env.Browser
view source
engineVersion : Ext.Version

Read-only, refer to Ext.Version

Read-only, refer to Ext.Version

Ext.Base
view source
implement : Function
Add methods / properties to the prototype of this class. Ext.define('My.awesome.Cat', { constructor: function() ...

Add methods / properties to the prototype of this class.

    Ext.define('My.awesome.Cat', {
        constructor: function() {
            ...
        }
    });

     My.awesome.Cat.implement({
         meow: function() {
            alert('Meowww...');
         }
     });

     var kitty = new My.awesome.Cat;
     kitty.meow();

Ext.env.Browser
view source
is : Object
A "hybrid" property, can be either accessed as a method call, i.e: if (Ext.browser.is('IE')) { ... } or as an obj...

A "hybrid" property, can be either accessed as a method call, i.e:

    if (Ext.browser.is('IE')) { ... }

or as an object with boolean properties, i.e:

    if (Ext.browser.is.IE) { ... }

Versions can be conveniently checked as well. For example:

    if (Ext.browser.is.IE6) { ... } // Equivalent to (Ext.browser.is.IE && Ext.browser.version.equals(6))

Note that only major component and shortVersion value of the version are available via direct property checking.

Supported values are: IE, Firefox, Safari, Chrome, Opera, WebKit, Gecko, Presto, Trident and Other

Ext.env.Browser
view source
isSecure : Boolean

True if the page is running over SSL

True if the page is running over SSL

Ext.env.Browser
view source
isStrict : Boolean

True if the document is in strict mode

True if the document is in strict mode

Ext.env.Browser
view source
name : String

Read-only - the full name of the current browser Possible values are: IE, Firefox, Safari, Chrome, Opera and Other

Read-only - the full name of the current browser Possible values are: IE, Firefox, Safari, Chrome, Opera and Other

Ext.Base
view source
override : Function
Override prototype members of this class. Overridden methods can be invoked via Ext.Base.callOverridden Ext.define('...

Override prototype members of this class. Overridden methods can be invoked via Ext.Base.callOverridden

    Ext.define('My.Cat', {
        constructor: function() {
            alert("I'm a cat!");

            return this;
        }
    });

    My.Cat.override({
        constructor: function() {
            alert("I'm going to be a cat!");

            var instance = this.callOverridden();

            alert("Meeeeoooowwww");

            return instance;
        }
    });

    var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
                              // alerts "I'm a cat!"
                              // alerts "Meeeeoooowwww"

Ext.env.Browser
view source
version : Ext.Version

Read-only, refer to Ext.Version

Read-only, refer to Ext.Version

Defined By

### Methods

Ext.Base
view source
callOverridden( Array/Arguments args) : Mixed
Call the original method that was previously overridden with Ext.Base.override Ext.define('My.Cat', { constructo...

Call the original method that was previously overridden with Ext.Base.override

    Ext.define('My.Cat', {
        constructor: function() {
            alert("I'm a cat!");

            return this;
        }
    });

    My.Cat.override({
        constructor: function() {
            alert("I'm going to be a cat!");

            var instance = this.callOverridden();

            alert("Meeeeoooowwww");

            return instance;
        }
    });

    var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
                              // alerts "I'm a cat!"
                              // alerts "Meeeeoooowwww"

### Parameters

- args : Array/Arguments

  The arguments, either an array or the `arguments` object

### Returns

- Mixed

  Returns the result after calling the overridden method

Ext.Base
view source
getName : String
Get the current class' name in string format. Ext.define('My.cool.Class', { constructor: function() { al...

Get the current class' name in string format.

    Ext.define('My.cool.Class', {
        constructor: function() {
            alert(this.self.getName()); // alerts 'My.cool.Class'
        }
    });

    My.cool.Class.getName(); // 'My.cool.Class'

### Returns

- String

  className