Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.env.Browser.html
diff --git a/docs/api/Ext.env.Browser.html b/docs/api/Ext.env.Browser.html
new file mode 100644 (file)
index 0000000..5cf79dc
--- /dev/null
@@ -0,0 +1,292 @@
+<!DOCTYPE html><html><head><title>Ext.env.Browser | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
+<style type="text/css">.head-band { display: none; }
+.header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
+.doc-tab .members .member a.more { background-color: #efefef; }
+</style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
+</head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
+<a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
+
+    req = {
+        liveURL: '.',
+        standAloneMode: true,
+        origDocClass: 'Ext.env.Browser',
+        docClass: 'Ext.env.Browser',
+        docReq: 'Ext.env.Browser',
+        version: '4.0',
+        baseURL: '.',
+        baseDocURL: '.',
+        baseProdURL: '.'
+    };
+
+    clsInfo = {};
+
+
+
+</script>
+
+<script type="text/javascript" src="../search.js"></script>
+<!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
+<script type="text/javascript" src="../class_tree.js"></script>
+<script type="text/javascript" src="../class_doc.js"></script>
+<script type="text/javascript">
+    req.source = 'Browser.html#Ext-env.Browser';
+    clsInfo = {"methods":["callOverridden","getName"],"cfgs":[],"properties":["addStatics","borrow","create","createAlias","engineName","engineVersion","implement","is","isSecure","isStrict","name","override","version"],"events":[],"subclasses":[]};
+    Ext.onReady(function() {
+        Ext.create('Docs.classPanel');
+    });
+</script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/Browser.html#Ext-env.Browser" target="_blank">Ext.env.Browser</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><pre class="subclasses"><h4>Hierarchy</h4><div class="subclass f"><a href="Ext.Base.html" rel="Ext.Base" class="cls docClass">Ext.Base</a><div class="subclass"><strong>Ext.env.Browser</strong></div></div></pre><p>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:</p>
+
+<pre class="prettyprint"><code>if (Ext.browser.is.IE) {
+     // IE specific code here
+}
+
+if (Ext.browser.is.WebKit) {
+     // WebKit specific code here
+}
+
+console.log("Version " + Ext.browser.version);
+</code></pre>
+
+
+<p>For a full list of supported values, refer to: <a href="Ext.env.Browser.html#is" rel="Ext.env.Browser#is" class="docClass">is</a></p>
+
+<p>@borrows Ext.Base.extend</p>
+<div class="members"><div class="m-properties"><a name="properties"></a><div class="definedBy">Defined By</div><h3 class="prp p">Properties</h3><div id="property-addStatics" class="member f inherited"><a href="Ext.env.Browser.html#property-addStatics" rel="property-addStatics" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-addStatics" class="viewSource">view source</a></div><a name="addStatics"></a><a name="property-addStatics"></a><a href="Ext.env.Browser.html#" rel="property-addStatics" class="cls expand">addStatics</a><span> : Function</span></div><div class="description"><div class="short">Add / override static properties of this class.
+
+Ext.define('My.cool.Class', {
+    ...
+});
+
+My.cool.Class.addStatics(...</div><div class="long"><p>Add / override static properties of this class.</p>
+
+<pre><code>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() { ... };
+});
+</code></pre>
+</div></div></div><div id="property-borrow" class="member inherited"><a href="Ext.env.Browser.html#property-borrow" rel="property-borrow" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-borrow" class="viewSource">view source</a></div><a name="borrow"></a><a name="property-borrow"></a><a href="Ext.env.Browser.html#" rel="property-borrow" class="cls expand">borrow</a><span> : Function</span></div><div class="description"><div class="short">Borrow another class' members to the prototype of this class.
+
+Ext.define('Bank', {
+
+money: '$$$',
+printMoney: functi...</div><div class="long"><p>Borrow another class' members to the prototype of this class.</p>
+
+<p>Ext.define('Bank', {</p>
+
+<pre><code>money: '$$$',
+printMoney: function() {
+    alert('$$$$$$$');
+}
+</code></pre>
+
+<p>});</p>
+
+<p>Ext.define('Thief', {</p>
+
+<pre><code>...
+</code></pre>
+
+<p>});</p>
+
+<p>Thief.borrow(Bank, ['money', 'printMoney']);</p>
+
+<p>var steve = new Thief();</p>
+
+<p>alert(steve.money); // alerts '$$$'
+steve.printMoney(); // alerts '$$$$$$$'</p>
+</div></div></div><div id="property-create" class="member inherited"><a href="Ext.env.Browser.html#property-create" rel="property-create" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-create" class="viewSource">view source</a></div><a name="create"></a><a name="property-create"></a><a href="Ext.env.Browser.html#" rel="property-create" class="cls expand">create</a><span> : Function</span></div><div class="description"><div class="short">Create a new instance of this Class.
+Ext.define('My.cool.Class', {
+
+...
+
+
+});
+
+My.cool.Class.create({
+
+someConfig: tr...</div><div class="long"><p>Create a new instance of this Class.
+Ext.define('My.cool.Class', {</p>
+
+<pre><code>...
+</code></pre>
+
+<p>});</p>
+
+<p>My.cool.Class.create({</p>
+
+<pre><code>someConfig: true
+</code></pre>
+
+<p>});</p>
+</div></div></div><div id="property-createAlias" class="member inherited"><a href="Ext.env.Browser.html#property-createAlias" rel="property-createAlias" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-createAlias" class="viewSource">view source</a></div><a name="createAlias"></a><a name="property-createAlias"></a><a href="Ext.env.Browser.html#" rel="property-createAlias" class="cls expand">createAlias</a><span> : Function</span></div><div class="description"><div class="short">Create aliases for existing prototype methods. Example:
+
+Ext.define('My.cool.Class', {
+    method1: function() { ... ...</div><div class="long"><p>Create aliases for existing prototype methods. Example:</p>
+
+<pre><code>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() -&gt; test.method1()
+</code></pre>
+</div></div></div><div id="property-engineName" class="member ni"><a href="Ext.env.Browser.html#property-engineName" rel="property-engineName" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.env.Browser.html" class="definedIn docClass">Ext.env.Browser</a><br/><a href="../source/Browser.html#Ext-env.Browser-property-engineName" class="viewSource">view source</a></div><a name="engineName"></a><a name="property-engineName"></a><a href="Ext.env.Browser.html#" rel="property-engineName" class="cls expand">engineName</a><span> : String</span></div><div class="description"><div class="short"><p>Read-only - the full name of the current browser's engine
+Possible values are: WebKit, Gecko, Presto, Trident and Other</p>
+</div><div class="long"><p>Read-only - the full name of the current browser's engine
+Possible values are: WebKit, Gecko, Presto, Trident and Other</p>
+</div></div></div><div id="property-engineVersion" class="member ni"><a href="Ext.env.Browser.html#property-engineVersion" rel="property-engineVersion" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.env.Browser.html" class="definedIn docClass">Ext.env.Browser</a><br/><a href="../source/Browser.html#Ext-env.Browser-property-engineVersion" class="viewSource">view source</a></div><a name="engineVersion"></a><a name="property-engineVersion"></a><a href="Ext.env.Browser.html#" rel="property-engineVersion" class="cls expand">engineVersion</a><span> : Ext.Version</span></div><div class="description"><div class="short"><p>Read-only, refer to <a href="Ext.Version.html" rel="Ext.Version" class="docClass">Ext.Version</a></p>
+</div><div class="long"><p>Read-only, refer to <a href="Ext.Version.html" rel="Ext.Version" class="docClass">Ext.Version</a></p>
+</div></div></div><div id="property-implement" class="member inherited"><a href="Ext.env.Browser.html#property-implement" rel="property-implement" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-implement" class="viewSource">view source</a></div><a name="implement"></a><a name="property-implement"></a><a href="Ext.env.Browser.html#" rel="property-implement" class="cls expand">implement</a><span> : Function</span></div><div class="description"><div class="short">Add methods / properties to the prototype of this class.
+
+Ext.define('My.awesome.Cat', {
+    constructor: function() ...</div><div class="long"><p>Add methods / properties to the prototype of this class.</p>
+
+<pre><code>Ext.define('My.awesome.Cat', {
+    constructor: function() {
+        ...
+    }
+});
+
+ My.awesome.Cat.implement({
+     meow: function() {
+        alert('Meowww...');
+     }
+ });
+
+ var kitty = new My.awesome.Cat;
+ kitty.meow();
+</code></pre>
+</div></div></div><div id="property-is" class="member ni"><a href="Ext.env.Browser.html#property-is" rel="property-is" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.env.Browser.html" class="definedIn docClass">Ext.env.Browser</a><br/><a href="../source/Browser.html#Ext-env.Browser-property-is" class="viewSource">view source</a></div><a name="is"></a><a name="property-is"></a><a href="Ext.env.Browser.html#" rel="property-is" class="cls expand">is</a><span> : Object</span></div><div class="description"><div class="short">A "hybrid" property, can be either accessed as a method call, i.e:
+
+if (Ext.browser.is('IE')) { ... }
+
+
+
+or as an obj...</div><div class="long"><p>A "hybrid" property, can be either accessed as a method call, i.e:</p>
+
+<pre><code>if (Ext.browser.is('IE')) { ... }
+</code></pre>
+
+
+<p>or as an object with boolean properties, i.e:</p>
+
+<pre><code>if (Ext.browser.is.IE) { ... }
+</code></pre>
+
+
+<p>Versions can be conveniently checked as well. For example:</p>
+
+<pre><code>if (Ext.browser.is.IE6) { ... } // Equivalent to (Ext.browser.is.IE && Ext.browser.version.equals(6))
+</code></pre>
+
+
+<p>Note that only <a href="Ext.Version.html#getMajor" rel="Ext.Version#getMajor" class="docClass">major component</a>  and <a href="Ext.Version.html#getShortVersion" rel="Ext.Version#getShortVersion" class="docClass">shortVersion</a>
+value of the version are available via direct property checking.</p>
+
+<p>Supported values are: IE, Firefox, Safari, Chrome, Opera, WebKit, Gecko, Presto, Trident and Other</p>
+</div></div></div><div id="property-isSecure" class="member ni"><a href="Ext.env.Browser.html#property-isSecure" rel="property-isSecure" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.env.Browser.html" class="definedIn docClass">Ext.env.Browser</a><br/><a href="../source/Browser.html#Ext-env.Browser-property-isSecure" class="viewSource">view source</a></div><a name="isSecure"></a><a name="property-isSecure"></a><a href="Ext.env.Browser.html#" rel="property-isSecure" class="cls expand">isSecure</a><span> : Boolean</span></div><div class="description"><div class="short"><p>True if the page is running over SSL</p>
+</div><div class="long"><p>True if the page is running over SSL</p>
+</div></div></div><div id="property-isStrict" class="member ni"><a href="Ext.env.Browser.html#property-isStrict" rel="property-isStrict" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.env.Browser.html" class="definedIn docClass">Ext.env.Browser</a><br/><a href="../source/Browser.html#Ext-env.Browser-property-isStrict" class="viewSource">view source</a></div><a name="isStrict"></a><a name="property-isStrict"></a><a href="Ext.env.Browser.html#" rel="property-isStrict" class="cls expand">isStrict</a><span> : Boolean</span></div><div class="description"><div class="short"><p>True if the document is in strict mode</p>
+</div><div class="long"><p>True if the document is in strict mode</p>
+</div></div></div><div id="property-name" class="member ni"><a href="Ext.env.Browser.html#property-name" rel="property-name" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.env.Browser.html" class="definedIn docClass">Ext.env.Browser</a><br/><a href="../source/Browser.html#Ext-env.Browser-property-name" class="viewSource">view source</a></div><a name="name"></a><a name="property-name"></a><a href="Ext.env.Browser.html#" rel="property-name" class="cls expand">name</a><span> : String</span></div><div class="description"><div class="short"><p>Read-only - the full name of the current browser
+Possible values are: IE, Firefox, Safari, Chrome, Opera and Other</p>
+</div><div class="long"><p>Read-only - the full name of the current browser
+Possible values are: IE, Firefox, Safari, Chrome, Opera and Other</p>
+</div></div></div><div id="property-override" class="member inherited"><a href="Ext.env.Browser.html#property-override" rel="property-override" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-override" class="viewSource">view source</a></div><a name="override"></a><a name="property-override"></a><a href="Ext.env.Browser.html#" rel="property-override" class="cls expand">override</a><span> : Function</span></div><div class="description"><div class="short">Override prototype members of this class. Overridden methods can be invoked via
+Ext.Base.callOverridden
+
+Ext.define('...</div><div class="long"><p>Override prototype members of this class. Overridden methods can be invoked via
+<a href="Ext.Base.html#callOverridden" rel="Ext.Base#callOverridden" class="docClass">Ext.Base.callOverridden</a></p>
+
+<pre><code>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"
+</code></pre>
+</div></div></div><div id="property-version" class="member ni"><a href="Ext.env.Browser.html#property-version" rel="property-version" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.env.Browser.html" class="definedIn docClass">Ext.env.Browser</a><br/><a href="../source/Browser.html#Ext-env.Browser-property-version" class="viewSource">view source</a></div><a name="version"></a><a name="property-version"></a><a href="Ext.env.Browser.html#" rel="property-version" class="cls expand">version</a><span> : Ext.Version</span></div><div class="description"><div class="short"><p>Read-only, refer to <a href="Ext.Version.html" rel="Ext.Version" class="docClass">Ext.Version</a></p>
+</div><div class="long"><p>Read-only, refer to <a href="Ext.Version.html" rel="Ext.Version" class="docClass">Ext.Version</a></p>
+</div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-callOverridden" class="member f inherited"><a href="Ext.env.Browser.html#method-callOverridden" rel="method-callOverridden" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-method-callOverridden" class="viewSource">view source</a></div><a name="callOverridden"></a><a name="method-callOverridden"></a><a href="Ext.env.Browser.html#" rel="method-callOverridden" class="cls expand">callOverridden</a>(
+<span class="pre">Array/Arguments args</span>)
+ : Mixed</div><div class="description"><div class="short">Call the original method that was previously overridden with Ext.Base.override
+
+Ext.define('My.Cat', {
+    constructo...</div><div class="long"><p>Call the original method that was previously overridden with <a href="Ext.Base.html#override" rel="Ext.Base#override" class="docClass">Ext.Base.override</a></p>
+
+<pre><code>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"
+</code></pre>
+<h3 class="pa">Parameters</h3><ul><li><span class="pre">args</span> : Array/Arguments<div class="sub-desc"><p>The arguments, either an array or the <code>arguments</code> object</p>
+</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Mixed</span>&nbsp; &nbsp;<p>Returns the result after calling the overridden method</p>
+</li></ul></div></div></div><div id="method-getName" class="member inherited"><a href="Ext.env.Browser.html#method-getName" rel="method-getName" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-method-getName" class="viewSource">view source</a></div><a name="getName"></a><a name="method-getName"></a><a href="Ext.env.Browser.html#" rel="method-getName" class="cls expand">getName</a> : String</div><div class="description"><div class="short">Get the current class' name in string format.
+
+Ext.define('My.cool.Class', {
+    constructor: function() {
+        al...</div><div class="long"><p>Get the current class' name in string format.</p>
+
+<pre><code>Ext.define('My.cool.Class', {
+    constructor: function() {
+        alert(this.self.getName()); // alerts 'My.cool.Class'
+    }
+});
+
+My.cool.Class.getName(); // 'My.cool.Class'
+</code></pre>
+<h3 class="pa">Returns</h3><ul><li><span class="pre">String</span>&nbsp; &nbsp;<p>className</p>
+</li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>
\ No newline at end of file