dominikh / go-js-dom

MIT License
252 stars 42 forks source link

rebase PointerEvent on top of MouseEvent #80

Closed dmitshur closed 3 years ago

dmitshur commented 3 years ago

According to documentation on MDN¹, the PointerEvent interface inherits properties from MouseEvent, which in turn inherits from UIEvent, and that inherits from Event.

Embed MouseEvent in PointerEvent type in order to gain access to additional properties in PointerEvent.

This is similar to what was done to WheelEvent in Pull Request #77.

¹ https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent

dmitshur commented 3 years ago

This is motivated by Chrome changing "click" events to send PointerEvent rather than MouseEvent, as described at https://groups.google.com/a/chromium.org/g/blink-dev/c/bta50W_Hg24/m/YAYeAzCZAAAJ.