Skip to main content
Version: 22.9.0

Touchscreen 类

¥Touchscreen class

Touchscreen 类公开触摸屏事件。

¥The Touchscreen class exposes touchscreen events.

签名:

¥Signature:

export declare abstract class Touchscreen

备注

¥Remarks

此类的构造函数被标记为内部构造函数。第三方代码不应直接调用构造函数或创建扩展 Touchscreen 类的子类。

¥The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Touchscreen class.

方法

¥Methods

方法

修饰符

描述

tap(x, y)

调度 touchstarttouchend 事件。

touchEnd()

调度 touchend 事件。

touchMove(x, y)

调度 touchMove 事件。

评论:

并非每个 touchMove 调用都会导致触发 touchmove 事件,具体取决于浏览器的优化。例如,Chrome throttles 触摸移动事件。

touchStart(x, y)

调度 touchstart 事件。