Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / src / core / src / env / FeatureDetector.js
index b373dc2..b36ce69 100644 (file)
@@ -1,19 +1,46 @@
+/*
+
+This file is part of Ext JS 4
+
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
+
+*/
 /**
- * @class Ext.env.FeatureDetector
+ * Provides useful information about the current browser features.
+ * Don't instantiate directly, but use the {@link Ext#features} property instead.
  */
 Ext.define('Ext.env.FeatureDetector', {
 
     statics: {
         defaultTests: {
+            /**
+             * @property {Boolean}
+             * True if canvas element supported.
+             */
             Canvas: function() {
                 var element = this.getTestElement('canvas');
                 return !!(element && element.getContext && element.getContext('2d'));
             },
+            /**
+             * @property {Boolean}
+             * True if SVG supported.
+             */
             SVG: function() {
                 var doc = Ext.global.document;
 
                 return !!(doc.createElementNS && !!doc.createElementNS("http:/" + "/www.w3.org/2000/svg", "svg").createSVGRect);
             },
+            /**
+             * @property {Boolean}
+             * True if VML supported.
+             */
             VML: function() {
                 var element = this.getTestElement(),
                     ret = false;
@@ -24,39 +51,87 @@ Ext.define('Ext.env.FeatureDetector', {
 
                 return ret;
             },
+            /**
+             * @property {Boolean}
+             * True if we're in Sencha Touch environment.
+             */
             Touch: function() {
                 return ('ontouchstart' in Ext.global) && !(Ext.platform && Ext.platform.name.match(/Windows|MacOSX|Linux/));
             },
+            /**
+             * @property {Boolean}
+             * True if orientation API supported.
+             */
             Orientation: function() {
                 return ('orientation' in Ext.global);
             },
+            /**
+             * @property {Boolean}
+             * True if geolocation API supported.
+             */
             Geolocation: function() {
                 return !!Ext.global.navigator.geolocation;
             },
+            /**
+             * @property {Boolean}
+             * True if openDatabase API supported.
+             */
             SqlDatabase: function() {
                 return !!Ext.global.openDatabase;
             },
+            /**
+             * @property {Boolean}
+             * True if WebSocket API supported.
+             */
             Websockets: function() {
                 return 'WebSocket' in Ext.global;
             },
+            /**
+             * @property {Boolean}
+             * True if history.pushState supported.
+             */
             History: function() {
                 return !!(Ext.global.history && Ext.global.history.pushState);
             },
+            /**
+             * @property {Boolean}
+             * True if CSS transforms supported.
+             */
             CSSTransforms: function() {
                 return this.isStyleSupported('transform');
             },
+            /**
+             * @property {Boolean}
+             * True if CSS 3D transforms supported.
+             */
             CSS3DTransforms: function() {
                 return this.has('csstransforms') && this.isStyleSupported('perspective');
             },
+            /**
+             * @property {Boolean}
+             * True if CSS animations supported.
+             */
             CSSAnimations: function() {
                 return this.isStyleSupported('animationName');
             },
+            /**
+             * @property {Boolean}
+             * True if CSS transitions supported.
+             */
             CSSTransitions: function() {
                 return this.isStyleSupported('transitionProperty');
             },
+            /**
+             * @property {Boolean}
+             * True if audio element supported.
+             */
             Audio: function() {
                 return !!this.getTestElement('audio').canPlayType;
             },
+            /**
+             * @property {Boolean}
+             * True if video element supported.
+             */
             Video: function() {
                 return !!this.getTestElement('video').canPlayType;
             }
@@ -199,10 +274,12 @@ Ext.define('Ext.env.FeatureDetector', {
 
 }, function() {
 
-/*
- * Global convenient instance of {@link Ext.env.FeatureDetector Ext.env.FeatureDetector}
- * @member Ext features
- */
-Ext.features = new Ext.env.FeatureDetector();
+    /**
+     * @property {Ext.env.FeatureDetector} features
+     * @member Ext
+     * Global convenient instance of {@link Ext.env.FeatureDetector}.
+     */
+    Ext.features = new Ext.env.FeatureDetector();
 
 });
+