https://github.com/akasha/akasha
which is similar to elemental2 but has a more natural Java API. For example for common event types specific methods had been added similar to GWT widgets.
But I don't know about the state and future of that library. Maybe you ask the maintainer about it. It might be an alternative for you but I am pretty sure it has other pain points, as always :)
-- J.
Craig Mitchell schrieb am Freitag, 1. August 2025 um 03:20:39 UTC+2:
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-handlersOn 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 google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/54288e20-58cf-4c74-98fd-6b429b24952dn%40googlegroups.com.
No comments:
Post a Comment