I was under the impression that all DOM manipulation calls are
synchronous, are you sure it's not GWT using the Scheduler under the
hood to run some of your code asynchronously? Can you give some
example code?
On Tue, Aug 28, 2012 at 2:33 PM, Joseph Lust <lifeoflust@gmail.com> wrote:
> I wanted to ask the community's opinion on the best practice for waiting for
> a DOM resource to become available.
>
> Use Case:
> You make an elaborate component via UiBinder or injecting some HTML/SVG into
> the DOM and upon executing the following statement trying to access an
> element that was injected, the DOM does not see it (i.e. inject 2MB of SVG)
> due to DOM parsing lag.
>
> Work Arounds:
>
> Schedule recurring timer to check if the element is available and then
> continue the program flow (now that the element's accessible in the DOM).
> OR Schedule a deferred timer and then continue (less robust, does not always
> work).
>
> So, curious what other folks have been using in this case where the GWT code
> must wait to wait for DOM parsing lag time. It seems to me like this is
> something there should be an official GWT function for doing as other
> frameworks do have functions to wait until an object becomes available in
> the DOM.
>
>
> Sincerely,
> Joseph
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/JpBdhNvNWbIJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment