Phaser API Documentation

  Version: 
getChildByName(name)

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 name. 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
name string

The name to search the children for.

Returns:
Description:

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

Type:
  • Element
Since: 3.17.0