On 2010/07/02 16:26:08, tbroyer wrote:
LGTM overall.
As a side note, where is the c.g.g.dom.client.EventListener defined?
Could it be
made generic? I like how the WebSocket proposal added a base Event
class
mimicking the DOM Event interface, with NativeEvent (and other WebSocket-specific events) extending it. EventListener could then be
defined as
interface EventListener<T extends Event>. It wouldn't be as type-safe
as
EventHandler (which "guards" you against adding a handler not matching
the
event's type) but would save us all doing casts to the specific Event
subclass
as the first line of all our EventListeners.
Whoops, just added the missing EventListener interface. I hadn't thought about making it generic, but it's worth considering. I also agree that it makes sense to hoist out the Event base class as in the WebSocket patch. If you all would like to try and get a patch landed while I'm gone, that includes the hoisted Event class, along with the EventListener/EventTarget changes, that would be awesome, and you'd have my blessing :) http://gwt-code-reviews.appspot.com/623803/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors