http://gwt-code-reviews.appspot.com/623803/diff/1/3
File user/src/com/google/gwt/dom/client/DOMImplStandard.java (right):

http://gwt-code-reviews.appspot.com/623803/diff/1/3#newcode115
user/src/com/google/gwt/dom/client/DOMImplStandard.java:115: public
native void addEventListener(EventTarget target, String type,
On 2010/07/02 16:07:27, jgw wrote:
I was trying to avoid creating a non-standard DOM interface
(EventTarget already
has addEventListener() defined). While your proposal is a simpler
solution, it
just pushes the burden on the user, who's going to be forced to do the
same
thing we're doing here. And while the implementation is kind of ugly,
it's still
efficient at runtime, which is less likely to be true if we force the
user to
hang on to an opaque handle.

In most cases, the user code is never going to unregister its handlers,
so it won't save the handle anyway.

If it does, it would just store it in a field rather than a map, which
would be more efficient than what the general implementation has to do
here.

http://gwt-code-reviews.appspot.com/623803/diff/1/3#newcode119
user/src/com/google/gwt/dom/client/DOMImplStandard.java:119:
listen...@com.google.gwt.dom.client.eventlistener::handleEvent(Lcom/google/gwt/dom/client/NativeEvent;)(e);
Why not just go ahead and add it?

http://gwt-code-reviews.appspot.com/623803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to