Thanks Gerard, I'll check out Elemento.
Elemental2 is a little lacking on strongly typing events. Eg: Adding this
code:
myElement.addEventListener(BrowserEvents.MOUSEDOWN, event -> {
MouseEvent mouseEvent = Js.cast(event);
...
});
I could mess up on the event name, or the typecast, and I wouldn't know
until runtime.
And unless you read the JS docs, it's not obvious what event name, maps to
what event object.
Having something that strongly types all the events, so it was obvious and
stops you messing up, would be great.
On Thursday, 31 July 2025 at 11:17:54 pm UTC+10 Gerard Keiser wrote:
> Elemento has event more event types, if you need:
> https://hal-console.gitbook.io/elemento/event-handlers
>
> On Thursday, July 31, 2025 at 4:45:19 AM UTC-5 Jens wrote:
>
>> btw: With addEventListener, we have to use hard coded strings for the
>> event name. Eg:
>>
>> img.addEventListener("load", e -> doStuff());
>>
>> Or are there event name constants we can use somewhere?
>>
>>
>> GWT has com.google.gwt.dom.client.BrowserEvents but it is not a complete
>> list.
>>
>> -- J.
>>
>
--
You received this message because you are subscribed to the Google Groups "GWT
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/google-web-toolkit/094cfcd2-209d-4537-9d69-6d7218576b53n%40googlegroups.com.