]> git.proxmox.com Git - sencha-touch.git/blame - src/src/device/Browser.js
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / src / device / Browser.js
CommitLineData
c4685c84
TL
1/**
2 *
3 *
4 * @mixins Ext.device.browser.Abstract
5 *
6 * @aside guide native_apis
7 */
8Ext.define('Ext.device.Browser', {
9 singleton: true,
10
11 requires: [
12 'Ext.device.Communicator',
13 'Ext.device.browser.Cordova',
14 'Ext.device.browser.Simulator'
15 ],
16
17 constructor: function() {
18 var browserEnv = Ext.browser.is;
19
20 if (browserEnv.WebView && browserEnv.Cordova) {
21 return Ext.create('Ext.device.browser.Cordova');
22 }
23
24 return Ext.create('Ext.device.browser.Simulator');
25 }
26});