Skip to content

Add GestureEvent (a WebKit proprietary interface for multitouch)#4589

Merged
daxpedda merged 4 commits intowasm-bindgen:mainfrom
thatcomputerguy0101:gesture-event
Sep 3, 2025
Merged

Add GestureEvent (a WebKit proprietary interface for multitouch)#4589
daxpedda merged 4 commits intowasm-bindgen:mainfrom
thatcomputerguy0101:gesture-event

Conversation

@thatcomputerguy0101
Copy link
Copy Markdown
Contributor

GestureEvent is a WebKit proprietary interface for receiving multitouch pinch and rotation gestures. The information for the WebIDL was gathered from https://developer.apple.com/documentation/webkitjs/gestureevent.

I assumed this needed to be in unstable and not enabled due to being a non-standard API, but that does limit its usability.

Copy link
Copy Markdown
Member

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just missing a changelog entry.

Copy link
Copy Markdown
Member

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@daxpedda daxpedda enabled auto-merge (squash) September 3, 2025 16:25
@daxpedda daxpedda merged commit 038c589 into wasm-bindgen:main Sep 3, 2025
66 checks passed
@thatcomputerguy0101
Copy link
Copy Markdown
Contributor Author

I thought the [BinaryName="clientX"] line allowed the JS name and the Rust name to be separate. I didn't realize it was just a browser-specific attribute. Those two fields should be named clientX and clientY instead of x and y, which I have changed on the branch this PR was created from. Should I create a new PR?

@daxpedda
Copy link
Copy Markdown
Member

daxpedda commented Sep 4, 2025

I thought the [BinaryName="clientX"] line allowed the JS name and the Rust name to be separate.

Why should they be separate in this case? Shouldn't they always be named clientX/clientY?

Should I create a new PR?

Yes please!

I also noticed that we got the constructor wrong. This type doesn't seem to have a constructor, but initGestureEvent is just a method, similar to initMouseEvent.

@thatcomputerguy0101
Copy link
Copy Markdown
Contributor Author

Why should they be separate in this case? Shouldn't they always be named clientX/clientY?

They shouldn't be separate. I had inferred conventions that don't exist.

I also noticed that we got the constructor wrong. This type doesn't seem to have a constructor, but initGestureEvent is just a method, similar to initMouseEvent.

I will also fix that in the next PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants