Phaser API Documentation


Member of: Phaser.DOM

<static> GetTarget(element)


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.


name type description
element HTMLElement

The DOM element to look-up.

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