Phaser API Documentation

  Version: 
setText(text)

Description:

Sets the innerText property of the DOM Element node and updates the internal sizes.

Note that only certain types of Elements can have innerText set on them.

Parameters:

name type description
text string

A DOMString representing the rendered text content of the element.

Returns:
Description:

This DOM Element instance.

Since: 3.17.0