Does GWT "know" which event type was fired for overloaded events?

28 views
Skip to first unread message

Oliver Yasuna

unread,
Aug 23, 2020, 6:56:46 AM8/23/20
to GWT Users

For example, the onscroll event could have been passed an Event or UIEvent and GWT has the ScrollEvent class for developers to handle it. But, does GWT give the developer a way to tell if the event was passed an Event or UIEvent? This is further complicated with the Error, which can be passed EventUIEvent, or ProgressEvent.

Thank you,

Oliver

Thomas Broyer

unread,
Aug 23, 2020, 6:59:35 AM8/23/20
to GWT Users
My answer on Gitter:
You can use getNativeEvent() to get the actual event, then probably use instanceof with JsInterop classes (e.g. from Elemental 2) to know whether it's a UIEvent or something else. 
Reply all
Reply to author
Forward
0 new messages