The issues arises because the selection script mutates the DOM by inserting
an iframe element into the body before the body tag has completed.

The only time this issue arises is when the compiled script completes
loading before the host page finished loading.

i.e. there are two sequences of events that can occur, and only one exibits
the bug :

This one avoids the bug (and is the most frequent occurance due to timings)

* host page starts loading
* selection script starts loading
* selection script XHR begins to load the compiled script
* host page completes loading which closes the BODY
* selection script XHR completes and appends the IFRAME to the BODY

This one exibits the bug :

* host page starts loading
* selection script starts loading
* selection script XHR begins to load the compiled script
* selection script XHR completes and appends the IFRAME to the BODY
* FAIL

The fix changes the flow of events to this :

* host page starts loading
* selection script starts loading
* selection script inserts a DIV element via document.write into the BODY.
This DIV is closed.
* selection script XHR begins to load the compiled script
* selection script XHR completes and appends the IFRAME to the DIV element
avoiding the bug since the new DIV element is closed

http://code.google.com/p/google-web-toolkit/issues/detail?id=3717

Cheers

Cameron

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to