Phaser API Documentation

  Version: 
getChildByID(id)

Description:

Gets all children from this DOM Elements node, using querySelectorAll('*') and then iterates through them, looking for the first one that has a matching id. It then returns this child if found, or null if not.

Be aware that class and id names are case-sensitive.

Parameters:

name type description
id string

The id to search the children for.

Returns:
Description:

The first matching child DOM Element, or null if not found.

Type:
  • Element
Since: 3.17.0