Hi,

We're using jQuery with GWT and, long story short, here's what happens:

A third-party GWT module (let's call it "chicken") includes jQuery and
makes some additions to the jQuery object.  Along comes another GWT
module (let's call it "tuna") that also includes jQuery and, without
the ability to control the order in which both modules are loaded, the
contents of jquery.js is included/executed twice during page load,
resulting in the loss of the additions made by the "chicken" module.

In other words, the <body> element would contain something like this:

<SCRIPT language="javascript" src="gwt.application.nocache.js"> </SCRIPT>
<SCRIPT language="javascript"
src="http://localhost:8888/gwt.application/js/chicken/jquery.js";>
</SCRIPT>
<SCRIPT language="javascript"
src="http://localhost:8888/gwt.application/js/chicken/jquery.additions.js";>
</SCRIPT>
<SCRIPT language="javascript"
src="http://localhost:8888/gwt.application/js/tuna/jquery.js";>
</SCRIPT>

Now, since the "tuna" module is not always used alongside the
"chicken" module, it can't not (i.e. it must) include jsquery.js, and
the reverse is also true.

We think the simplest and best way to fix this problem is simply to
have jquery.js be safe to include more than once and thus we are
proposing the attached patch, which makes all of [the generated]
jquery.js conditional upon having not executed already.


HTH,
- Oli

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" 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/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: PreventFromLoadingMoreThanOnce.patch
Description: Binary data

Reply via email to