Phaser API Documentation

  Version: 
<static> TouchAction(canvas, [value])

Description:

Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.

Parameters:

name type arguments Default description
canvas HTMLCanvasElement

The canvas element to have the style applied to.

value string <optional> 'none'

The touch action value to set on the canvas. Set to none to disable touch actions.

Returns:
Description:

The canvas element.

Type:
  • HTMLCanvasElement
Examples:
Since: 3.0.0