We just had a similar concern come up but with the existing Dom package. If the 
init for a model wants to generate a focus command — the autofocus property is 
proving unreliable for reasons as yet undetermined — how can we arrange to have 
that command execute after the view has actually been instantiated? Do we need 
to chain off of animation ticks and wait a round or two before the focus task 
runs?

Mark

> On Jan 3, 2017, at 10:54 PM, Richard Feldman <[email protected]> 
> wrote:
> 
> Hi Sebastian,
> 
> Elm batches DOM updat`es using requestAnimationFrame, so you should be able 
> to delay until after the next DOM update by wrapping your entire callback 
> (starting from let el = document.body.querySelector(selector)) in a call to 
> requestAnimationFrame.
> 
> See if that works!
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to