Phaser API Documentation

  Version: 

Member of: Phaser.DOM

<static> GetTarget(element)

Description:

Attempts to get the target DOM element based on the given value, which can be either a string, in which case it will be looked-up by ID, or an element node. If nothing can be found it will return a reference to the document.body.

Parameters:

name type description
element HTMLElement

The DOM element to look-up.

Since: 3.16.0
Source: src/dom/GetTarget.js (Line 7)