mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 22:52:14 +00:00
Merge pull request #1102 from videlais/patch-1
Device detection of Apache Cordova
This commit is contained in:
commit
6fd51e29b2
1 changed files with 11 additions and 0 deletions
|
@ -38,6 +38,12 @@ Phaser.Device = function (game) {
|
|||
*/
|
||||
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?
|
||||
* @default
|
||||
|
@ -621,6 +627,11 @@ Phaser.Device.prototype = {
|
|||
this.webApp = true;
|
||||
}
|
||||
|
||||
if (typeof window.cordova !== "undefined")
|
||||
{
|
||||
this.cordova = true;
|
||||
}
|
||||
|
||||
if (navigator['isCocoonJS'])
|
||||
{
|
||||
this.cocoonJS = true;
|
||||
|
|
Loading…
Reference in a new issue