Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event handling in bubbling phase #385

Open
Schahen opened this issue Oct 13, 2017 · 0 comments
Open

Event handling in bubbling phase #385

Schahen opened this issue Oct 13, 2017 · 0 comments

Comments

@Schahen
Copy link

Schahen commented Oct 13, 2017

In /gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java there's a following piece of code:

  private static native void sinkBitlessEvent(Element elem, String name) /*-{
    if (!elem.__gquery)
      elem.__gquery = [];
    if (elem.__gquery[name])
      return;
    elem.__gquery[name] = true;

    var handle = function(event) {
      elem.__gqueryevent.@com.google.gwt.query.client.plugins.events.EventsListener::onBrowserEvent(Lcom/google/gwt/user/client/Event;)(event);
    };

    if (elem.addEventListener)
      elem.addEventListener(name, handle, true);
    else
      elem.attachEvent("on" + name, handle);
  }-*/;

From what I see it seems to me that there's no possibility to add event handler for bubbling phase.
If I'm wrong can someone show me how this is supposed to be done.
If I'm right - what's the reasoning behind this? Would somebody mind if I'll create a PR for this if needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant