David Nouls
2018-10-12 12:05:13 UTC
I think I found a little bug in the java 8 support in GWT. Or at least, it does not work as I expected it would.
I am using Elemental2 and I am trying to remove an EventListener from a HTMLElement.
The listener was previously installed like this:
element.addEventListener(âclickâ, this::handleClick)
when I remove the listener, I also use the same method reference on the same object.
element.removeEventListener(âclickâ, this::handleClick)
but in reality the click handler is not removed.
I was expecting that this method reference would always yield the same JS object, but it does not seem that way.
Is that intentional or a bug or am I missing something ?
I am using Elemental2 and I am trying to remove an EventListener from a HTMLElement.
The listener was previously installed like this:
element.addEventListener(âclickâ, this::handleClick)
when I remove the listener, I also use the same method reference on the same object.
element.removeEventListener(âclickâ, this::handleClick)
but in reality the click handler is not removed.
I was expecting that this method reference would always yield the same JS object, but it does not seem that way.
Is that intentional or a bug or am I missing something ?
--
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+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
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+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.