title: Use ClickHandler with a native Javascript object?
body: <p>In Javascript, I'm making an SVG shape and adding a click handler to it like this:</p>
  
  <pre><code>  var rect = document.createElementNS('http://www.w3.org/2000/svg','rect');
    rect.addEventListener('click', myClickHandler, false);
  </code></pre>
  
  <p>This works great. I'm trying to make an overlay Rect class in GWT. If possible, I'd like to simply do something like this:</p>
  
  <pre><code>public class SVGRect extends JavaScriptObject {
  
      public native void addClickHandler(ClickHandler handler) /*-{
          addEventListener('click', handler, false);
      }-*/;
  }
  </code></pre>
  
  <p>This way I can pass a 'normal' GWT handler to this class, and use it from the outside as any other normal GWT UI element. I'm not sure how to hook up the ClickHandler object to the native javascript implementation of the object though?</p>
  
  <p>Thanks</p>