diff --git a/src/system/Device.js b/src/system/Device.js index 74037e09d..7c17709b1 100644 --- a/src/system/Device.js +++ b/src/system/Device.js @@ -38,6 +38,12 @@ Phaser.Device = function (game) { */ this.cocoonJS = false; + /** + * @property {boolean} cocoonJSApp - Is this game running with CocoonJS.App? + * @default + */ + this.cocoonJSApp = false; + /** * @property {boolean} cordova - Is the game running under Apache Cordova? * @default @@ -662,6 +668,15 @@ Phaser.Device.prototype = { { this.cocoonJS = true; } + + if(this.cocoonJS) + { + try { + this.cocoonJSApp = (typeof CocoonJS !== "undefined"); + } catch(error) { + this.cocoonJSApp = false; + } + } if (typeof window.ejecta !== "undefined") {