On Friday, September 16, 2016 at 2:54:20 PM UTC+2, Pavel Kakolin wrote:
> Imagine an @JsType(isNative = true) EventTarget (basically Element) with
> @JsMethod addEventListener(final String type, final EventListener<?>
> We have a "mousedown" event listener and inside that listener we
> The problem is the ScheduledCommand is never executed after when mousedown
> event is fired. Scheduler.scheduleDeferred works as expected.
Are you sure it's *never* executed? (vs. executed in the "finally" of
another, later "event"?)
> Is it correct behaviour?
The thing is that JsInterop is "close to the metal", and won't wrap your
JsFunction into $entry() (which takes care of scheduleEntry and
scheduleFinally commands, and GWT.UncaughtExceptionHandler)
I *think* it's by-design.
for examples of rewriting GWT internals with JsInterop, that explicitly
$entry-wrap JsFunction⋅s (that's what's making me say it's by-design)
> Is there any right way to scheduleFinally from inside event listeners
> added to elements using jsinterop?
You'd have to somehow wrap your JsFunction into $entry() and actually pass
the $entry-wrapped function to your addEventListener.
You received this message because you are subscribed to the Google Groups "GWT
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.