Merge pull request #1102 from videlais/patch-1

Device detection of Apache Cordova
This commit is contained in:
Richard Davey 2014-08-11 19:07:06 +01:00
commit 6fd51e29b2

View file

@ -37,6 +37,12 @@ Phaser.Device = function (game) {
* @default
*/
this.cocoonJS = false;
/**
* @property {boolean} cordova - Is the game running under Apache Cordova?
* @default
*/
this.cordova = false;
/**
* @property {boolean} ejecta - Is the game running under Ejecta?
@ -620,6 +626,11 @@ Phaser.Device.prototype = {
{
this.webApp = true;
}
if (typeof window.cordova !== "undefined")
{
this.cordova = true;
}
if (navigator['isCocoonJS'])
{