Friday, September 16, 2016

Re: jsinterop and Scheduler.scheduleFinally

Are you sure it's *never* executed? (vs. executed in the "finally" of another, later "event"?)

In our synthetic test with one element and one event listener, yes, it's never executed. If we add another event listener in the old way eg using Window#addResizeHandler, then command scheduled from mousedown event is executed on window resize.

You'd have to somehow wrap your JsFunction into $entry() and actually pass the $entry-wrapped function to your addEventListener.

Your point is clear. I think we will figure something out, eg in our case "finally" nature of scheduled command does not matter much and we can easily replace scheduleFinally call with call to @JsMethod setTimeout of @JsType Window or something like this.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment