[Commits] r1127 - core/trunk/geoext/lib
commits at geoext.org
commits at geoext.org
Mon Jun 22 23:23:44 CEST 2009
Author: ahocevar
Date: 2009-06-22 23:23:44 +0200 (Mon, 22 Jun 2009)
New Revision: 1127
Modified:
core/trunk/geoext/lib/GeoExt.js
Log:
Fix the script loader for FF2 with an interesting workaround. r=tschaub (closes #102)
Modified: core/trunk/geoext/lib/GeoExt.js
===================================================================
--- core/trunk/geoext/lib/GeoExt.js 2009-06-22 20:48:37 UTC (rev 1126)
+++ core/trunk/geoext/lib/GeoExt.js 2009-06-22 21:23:44 UTC (rev 1127)
@@ -33,7 +33,12 @@
*/
var getScriptLocation = function() {
var scriptLocation = "";
- var scripts = document.getElementsByTagName('script');
+ // If we load other scripts right before GeoExt using the same
+ // mechanism to add script resources dynamically (e.g.OpenLayers),
+ // document.getElementsByTagName will not find the GeoExt script tag
+ // in FF2. Using document.documentElement.getElementsByTagName instead
+ // works around this issue.
+ var scripts = document.documentElement.getElementsByTagName('script');
for(var i=0, len=scripts.length; i<len; i++) {
var src = scripts[i].getAttribute('src');
if(src) {
More information about the Commits
mailing list