photonstorm/phaser — pull request #1120 by videlais (2014-08-21 04:12:29+00:00)
Title: Cordova 'deviceready' event check

A slightly obnoxious but necessary hack to prevent a race condition between the loading of Apache Cordova and Phaser itself.

Without waiting for the 'deviceready' event, Phaser can often load first, preventing any console messages from appearing to the user. Because Cordova writes to the platform's console (via CordovaLog), it must first be loaded and signal its own 'deviceready' event before console or plugin usage can occur. Otherwise, all messages and functionality is ignored.