Why can't you just always load jQuery beforehand, then neither of the libraries should need to load jQuery. Something requiring jQuery shouldn't imply that it loads it, rather it would be better if jQuery was loaded separately on it's own. Even if you make jQuery safe to include more than once you're still causing an unnecessary request when you try and load it a second time even though it's already loaded.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] -Nadir-Point (http://nadir-point.com) -Wiki-Tools (http://wiki-tools.com) -MonkeyScript (http://monkeyscript.nadir-point.com) -Animepedia (http://anime.wikia.com) -Narutopedia (http://naruto.wikia.com) -Soul Eater Wiki (http://souleater.wikia.com) Olivier Dagenais wrote: > 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 -~----------~----~----~----~------~----~------~--~---
