Opened 14 years ago
Closed 14 years ago
#2975 closed defect (fixed)
IE7: dojo does not load from local filesystem when isDebug: true
Reported by: | guest | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Dojo version:
profile=base, built from current 0.9 development sources of revision 8529
Browser:
IE7 only, does not occur with IE6, Firefox 2.0
Steps to reproduce:
- Save the attached file, isDebug_true.htm, to the local filesystem
- Build dojo, place it into dojo subfolder; place firebug files into dojo/_base/firebug/
- Launch IE7, open the file; if asked, allow the script to run
- The page prints "dojo.byId: undefined"
Expected result:
- "dojo.byId: function("...
This behavior is caused by what is already described in ticket #1711, but that one is against dojo 0.4/0.5. The following line in hostenv_browser.js throws an error, preventing further loading of dojo:
dojo.require("dojo._base.firebug.firebug");
Workaround:
Turning off "Native XMLHttp support" in advanced options of IE7, as suggested by ticket #1711, is a workaround.
Patch:
Patch to fix the issue against dojo 0.9, in /_base/loader/hostenv_browser.js, after the following line: (line 78, as of rev.8529)
try{ http = new XMLHttpRequest(); }catch(e){}
add something like the following lines:
if(dojo.isIE && location.protocol=="file:"){ http = null; }
Best regards,
Konstantin Kolinko
Attachments (1)
Change History (4)
Changed 14 years ago by
Attachment: | isDebug_true.htm added |
---|
comment:1 Changed 14 years ago by
Correction:
It would be more efficient just to avoid that
try{ http = new XMLHttpRequest(); }catch(e){}
call in the above case, instead of "null"ing its result. Also, '==' in strings comparison can be replaced with '==='.
Konstantin Kolinko
comment:2 Changed 14 years ago by
Owner: | changed from anonymous to Jared Jurkiewicz |
---|
Demonstrates the problem.