add cancelable property to the TouchEvent (#35713)

* add `cancelable` property to the `TouchEvent`
set cancellable = false when sending move events to script, if the first touch_move event did not cancel it

Signed-off-by: kongbai1996 <1782765876@qq.com>

* modified review commentss

Signed-off-by: kongbai1996 <1782765876@qq.com>

---------

Signed-off-by: kongbai1996 <1782765876@qq.com>
This commit is contained in:
Bi Fuguo 2025-03-02 16:12:26 +08:00 committed by GitHub
parent 67bd557f30
commit 929f87f598
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 2 deletions

View file

@ -2090,7 +2090,7 @@ impl Document {
window,
DOMString::from(event_name),
EventBubbles::Bubbles,
EventCancelable::Cancelable,
EventCancelable::from(event.is_cancelable()),
Some(window),
0i32,
&touches,