On Tuesday, July 11, 2017 at 1:46:55 PM UTC+2, Ignacio Baca Moreno-Torres 
wrote:
>
> What is going to happen with $entry() utility? Some guidance in the 
> JsInterop gdoc will be a good idea so libs-creator can apply a uniform 
> strategy.
>
> Elemento, for example, is waiting to see what to do (
> https://github.com/hal/elemento/issues/18), but there are various 
> libraries already using JsInterop that are just ignoring $entry() and may 
> produce unexpected behavior for its users.
>
> There are 2 "radical" possibilities
> 1. Deprecate user.Scheduler.
> 2. Strongly recommend wrapping everything with $entry (don't think is 
> possible to enforce this).
>
> There is a dirty option of not wrapping JsInterop callbacks with $entry 
> but maintains always a timer that tries to execute un-fired events. The 
> problem is that finally scheduled command will behave as deferred commands. 
> Another dirty option is to maintain a flag so the user can only schedule 
> finally commands if the stack was nested inside a $entry call. Those don't 
> seem good options.
>
> Just curious, how is this solved in j2cl? j2cl still uses a custom 
> scheduler or it only uses native js schedulers and timers? 
>

j2cl is "only" a transpiler, it doesn't provide event handling or 
scheduling or whatever. I highly doubt Google is using 
com.google.gwt.core.client.Scheduler along with j2cl.

There's a change under (active) review that would route window.onerror to 
the GWT.UncaughtExceptionHandler, so that at least $entry() would no longer 
be needed for that use-case: https://gwt-review.googlesource.com/c/18540/

For scheduleEntry/scheduleFinally, this will have to be discussed at the 
same time as widgets (as this is actually quite related).
$entry() is a "framework-y" part of GWT that we might want (personal 
opinion) to eventually remove, but there needs to be some replacement (not 
necessarily in terms of API, possibly guidelines on what to use instead, 
how to possibly refactor/rearchitect some code). scheduleFinally could 
possibly be replaced with Promise.resolve().then(…). scheduleEntry is 
trickier and would likely require bigger refactorings in code that uses it 
today.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/f7ecb861-6aa8-4888-963e-2630bae14309%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to