跳至主要內容
版本:23.11.1

觸控螢幕類別

Touchscreen 類別公開觸控螢幕事件。

簽名

export declare abstract class Touchscreen

備註

此類別的建構子標記為內部使用。第三方程式碼不應直接呼叫建構子,或建立延伸 `Touchscreen` 類別的子類別。

方法

方法

修飾符

描述

tap(x, y)

發送 `touchstart` 和 `touchend` 事件。

touchEnd()

在第一個活動的觸控上發送 `touchend` 事件。

touchMove(x, y)

在第一個活動的觸控上發送 `touchMove` 事件。

備註

並非每次呼叫 `touchMove` 都會導致發出 `touchmove` 事件,這取決於瀏覽器的最佳化。例如,Chrome 節流觸控移動事件。

touchStart(x, y)

發送 `touchstart` 事件。