Skip to content

Commit 6fd51e2

Browse files
committed
Merge pull request phaserjs#1102 from videlais/patch-1
Device detection of Apache Cordova
2 parents 6da5831 + d547252 commit 6fd51e2

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/system/Device.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ Phaser.Device = function (game) {
3737
* @default
3838
*/
3939
this.cocoonJS = false;
40+
41+
/**
42+
* @property {boolean} cordova - Is the game running under Apache Cordova?
43+
* @default
44+
*/
45+
this.cordova = false;
4046

4147
/**
4248
* @property {boolean} ejecta - Is the game running under Ejecta?
@@ -620,6 +626,11 @@ Phaser.Device.prototype = {
620626
{
621627
this.webApp = true;
622628
}
629+
630+
if (typeof window.cordova !== "undefined")
631+
{
632+
this.cordova = true;
633+
}
623634

624635
if (navigator['isCocoonJS'])
625636
{

0 commit comments

Comments
 (0)