Phaser API Documentation

  Version: 

Member of: Phaser.DOM

<static> DOMContentLoaded(callback)

Description:

Inspects the readyState of the document. If the document is already complete then it invokes the given callback. If not complete it sets up several event listeners such as deviceready, and once those fire, it invokes the callback. Called automatically by the Phaser.Game instance. Should not usually be accessed directly.

Parameters:

name type description
callback ContentLoadedCallback

The callback to be invoked when the device is ready and the DOM content is loaded.

Since: 3.0.0