📅  最后修改于: 2020-10-19 03:04:58             🧑  作者: Mango
它可以帮助您确定所使用的操作系统,所使用的浏览器以及适用于您环境的功能。
Sencha Touch提供了不同的功能来获取特定于环境的信息。如果条件为if(Ext.os.is.Windows){}并且基于条件,则可以检入以下提到的所有方法,并且可以执行任务。
以下所有方法均返回布尔值。
Ext.os是一个类,为您提供了不同的方法来了解我们正在使用的操作系统。
Sr.No | Method & Description |
---|---|
1 |
Ext.os.is.webOS This function will return true if you are using webos operating system else it returns false. |
2 |
Ext.os.is.RIMTable This function will return true if you are using RIMTable operating system else it returns false. |
3 |
Ext.os.is.Linux This function will return true if you are using Linux operating system else it returns false. |
4 |
Ext.os.is.Windows This function will return true if you are using windows operating system else it returns false. |
5 |
Ext.os.is.MacOs This function will return true if you are using Mac operating system else it returns false. |
6 |
Ext.os.is.BlackBerry This function will return true if you are using BlackBerry operating system else it returns false. |
7 |
Ext.os.is.iOS This function will return true if you are using IOS operating system else it returns false. |
8 |
Ext.os.is.Android This function will return true if you are using Android operating system else it returns false. |
Sr.No | Method & Description |
---|---|
1 |
Ext.os.is.iPad This function will return true if you are using iPad else it returns false. |
2 |
Ext.os.is.iPhone This function will return true if you are using iPhone else it returns false. |
3 |
Ext.os.is.iPod This function will return true if you are using iPod else it returns false. |
Sr.No | Method & Description |
---|---|
1 |
Ext.os.name It returns the name of the operating system. |
2 |
Ext.os.version.version It gives the version of operating system we are using. |
Sr.No | Method & Description |
---|---|
1 |
Ext.browser.is.IE This function returns true if we are using Internet explorer browser else it returns false. |
2 |
Ext.browser.is.FF This function returns true if we are using FireFox browser else it returns false. |
3 |
Ext.browser.is.Chrome This function returns true if we are using Chrome browser else it returns false. |
4 |
Ext.browser.is.Opera This function returns true if we are using Opera browser else it returns false. |
5 |
Ext.browser.is.Safari This function returns true if we are using Safari browser else it returns false. |
该函数Ext.browser提供了各种其他功能-
Sr.No | Method & Description |
---|---|
1 |
Ext.browser.userAgent It returns the current userAgent. |
2 |
Ext.browser.isSecure It returns true if the current page is using SSL. |
3 |
Ext.browser.isStrict It returns true if the browser is in strict mode. |
4 |
Ext.browser.engineName It returns the browser engine name (WebKit, Gecko, Presto, Trident and Other). |
5 |
Ext.browser.engineVersion It returns the version of the browser engine. |
Ext.feature.has是要检查浏览器是否具有以下功能。
Sr.No | Method & Description |
---|---|
1 |
Ext.feature.has.Audio This method returns true if browser supports audio tag feature of html5. |
2 |
Ext.feature.has.Canvas This method returns true if browser supports canvas tag feature of html5. |
3 |
Ext.feature.has.classList This method returns true if browser supports classlist feature of html5 which is used to add, remove and toggle css classes for the html element. |
4 |
Ext.feature.has.Css3dTransforms This method returns true if browser supports Css 3d Transform feature of css3. |
5 |
Ext.feature.has.CssAnimations This method returns true if browser supports animations of css3. |
6 |
Ext.feature.has.CssTransforms This method returns true if browser supports Css transform feature of css3. |
7 |
Ext.feature.has.CssTransitions This method returns true if browser supports transition feature of css3. |
8 |
Ext.feature.has.DeviceMotion This method returns true if browser supports the device motion feature. |
9 |
Ext.feature.has.Geolocation This method returns true if browser supports the Geolocation feature of html5. |
10 |
Ext.feature.has.History This method returns true if browser Supports history feature of html. |
11 |
Ext.feature.has.Orientation This method returns true if browser can detect which the device orientation. |
12 |
Ext.feature.has.OrientationChange This method returns true if browser can detect change in Orientation of the device. |
13 |
Ext.feature.has.Range Range is a type of html input tag for range slider element so if browser supports slider this function returns true. |
14 |
Ext.feature.has.SqlDatabase Web sql database is a web page api for storing data n database on which we can perform query operations. This method returns true if browser supports web Sql Database. |
15 |
Ext.feature.has.Svg Svg stands for Scalable Vector Graphics this method returns true if browser supports html 5’s svg feature. |
16 |
Ext.feature.has.Touch This method returns true if browser has Touch feature. |
17 |
Ext.feature.has.Video This method returns true if browser supports html 5 video tags. |
18 |
Ext.feature.has.Vml Vml stands for vector markup language which is an xml based markup language. So this method returns true if browser has supports vml. |
19 |
Ext.feature.has.WebSockets Web socket is basically a communication protocol for computers which supports two communication between clients and server. |