Phaser API Documentation

  Version: 
getChildByProperty(property, value)

Description:

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

Parameters:

name type description
property string

The property to search the children for.

value string

The value the property must strictly equal.

Returns:
Description:

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

Type:
  • Element
Since: 3.17.0