Quick hack but hope it helps (replace YOURMODULEID):
GWT (at least 2.0.x) uses document.write in two parts:
1) for inserting the marker scipt tag and
2) for inserting a <script defer="defer">callonInjectionDone...</script>
So if you do the (1) using document.appendChild it find the correct tag:
var marker = document.createElement('script');
marker.id = '__gwt_marker_YOURMODULEID';
document.appendChild(marker);
var script = document.createElement('script');
// this is the script with nocache.js
document.insertBefore(script, marker);
// then when it runs it uses write to insert the marker, it fails, but anyway
it
founds it where it should be.
Problem (2)
you must call
your_module_id.onInjectionDone('your.module.id');
in order to initialize the module.
You can hook this call into scriptTag.onload event. But it doesn't work in IE8
at least. I guess you could use onreadystatechange but I'm trying yet. Good
luck. Another option is trying every x miliseconds and call it once the
"onInjectionDone" method is defined (or all the methods that should be there).
To inspect the bootstrap script (nocache.js) compile with style=PRETTY option!
Good luck!
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.