X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..HEAD:/src/core/src/env/Browser.js diff --git a/src/core/src/env/Browser.js b/src/core/src/env/Browser.js index 1cf92016..6fd36032 100644 --- a/src/core/src/env/Browser.js +++ b/src/core/src/env/Browser.js @@ -13,25 +13,21 @@ If you are unsure which license is appropriate for your use, please contact the */ /** - * @class Ext.env.Browser - * @extends Ext.Base - * 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
- * }
+ * Provides useful information about the current browser.
+ * Should not be manually instantiated unless for unit-testing; access the global instance
+ * stored in {@link Ext#browser} instead. Example:
  *
- * if (Ext.browser.is.WebKit) {
- *      // WebKit specific code here
- * }
+ *     if (Ext.browser.is.IE) {
+ *          // IE specific code here
+ *     }
  *
- * console.log("Version " + Ext.browser.version);
- * 
+ * if (Ext.browser.is.WebKit) { + * // WebKit specific code here + * } * - * For a full list of supported values, refer to: {@link Ext.env.Browser#is} + * console.log("Version " + Ext.browser.version); * - * @borrows Ext.Base.extend + * For a full list of supported values, refer to: {@link Ext.env.Browser#is} */ Ext.define('Ext.env.Browser', { statics: { @@ -66,32 +62,29 @@ Ext.define('Ext.env.Browser', { }, /** + * @property {Boolean} isSecure * True if the page is running over SSL - * @type Boolean */ isSecure: false, /** + * @property {Boolean} isStrict * True if the document is in strict mode - * @type Boolean */ isStrict: false, /** * A "hybrid" property, can be either accessed as a method call, i.e: - *

-     * if (Ext.browser.is('IE')) { ... }
-     * 
+ * + * if (Ext.browser.is('IE')) { ... } * * or as an object with boolean properties, i.e: - *

-     * if (Ext.browser.is.IE) { ... }
-     * 
+ * + * 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))
-     * 
+ * + * if (Ext.browser.is.IE6) { ... } // Equivalent to (Ext.browser.is.IE && Ext.browser.version.equals(6)) * * Note that only {@link Ext.Version#getMajor major component} and {@link Ext.Version#getShortVersion shortVersion} * value of the version are available via direct property checking. @@ -105,28 +98,28 @@ Ext.define('Ext.env.Browser', { is: Ext.emptyFn, /** + * @property {String} name * Read-only - the full name of the current browser * Possible values are: IE, Firefox, Safari, Chrome, Opera and Other - * @type String */ name: null, /** + * @property {Ext.Version} version * Read-only, refer to {@link Ext.Version} - * @type Ext.Version */ version: null, /** + * @property {String} engineName * Read-only - the full name of the current browser's engine * Possible values are: WebKit, Gecko, Presto, Trident and Other - * @type String */ engineName: null, /** + * @property {String} engineVersion * Read-only, refer to {@link Ext.Version} - * @type Ext.Version */ engineVersion: null, @@ -185,6 +178,11 @@ Ext.define('Ext.env.Browser', { }, function() { + /** + * @property {Ext.env.Browser} browser + * @member Ext + * Global convenient instance of {@link Ext.env.Browser}. + */ Ext.browser = new Ext.env.Browser(); });