#7744 closed enhancement (fixed)
ability to point to a dojo release at an arbitrary location
Reported by: | Douglas Hays | Owned by: | James Burke |
---|---|---|---|
Priority: | low | Milestone: | 1.7 |
Component: | Loader | Version: | 1.2beta |
Keywords: | Cc: | Adam Peller, Rawld Gill | |
Blocked By: | Blocking: |
Description
I want to run some unit tests by pointing to a dojo source tree on a separate web server. I copied themeTester.html to my local hard disk and added a single BASE tag inside the file's existing <HEAD>:
<BASE href="http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/themes/themeTester.html"/>
and then browse to this file in IE7. I get 2 Permission Denied" exceptions, but then the file loads and seems to be functional.
I try the same test with FF3 and the file never even loads and the error console shows:
Error: Could not load 'dojo._firebug.firebug'; last tried './_firebug/firebug.js' Source File: http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/dojo.js Line: 16 Error: dojo.declare is not a function Source File: http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/dijit.js Line: 16 Error: dojo.Color is undefined Source File: http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/dijit-all.js Line: 16 Error: Could not load 'dijit.Menu'; last tried '../dijit/Menu.js' Source File: http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/dojo.js Line: 16 Error: dojo.connect is not a function Source File: http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/dijit.js Line: 16
I tried this using Safari3.1.2 and it loads and runs OK but I did notice the following in the error console (listed twice):
Not allowed to load local resource: file:///dojo/resources/dojo.css
I think this should load on FF3, and on all other browsers without errors.
Change History (5)
comment:1 Changed 11 years ago by
Milestone: | tbd → future |
---|
comment:2 Changed 11 years ago by
We'd like to be able to create dojo widgets that others can use on their website without requiring that they also install Dojo on their website ... I've just found this link "http://dev.aol.com/dojo" ... which contains the following text ...
"Use the following script tag to use Dojo 1.2.0: <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.2.0/dojo/dojo.xd.js"></script>
... so I think we're ok now.
comment:3 Changed 8 years ago by
Keywords: | needsreview added |
---|---|
Priority: | high → low |
is this ticket still relevant?
comment:4 Changed 8 years ago by
Cc: | Rawld Gill added |
---|---|
Component: | General → Loader |
Keywords: | needsreview removed |
Milestone: | future → 1.7 |
Resolution: | → fixed |
Status: | new → closed |
I checked, and this functionality works thanks to the AMD refactor, although not with the <base> tag. I modified my local themeTester.html as:
<script type="text/javascript" src="http://download.dojotoolkit.org/release-1.7.1/dojo-release-1.7.1/dojo/dojo.js" data-dojo-config="parseOnLoad: false, async:true"></script>
and it loads everything from that download.dojotoolkit.org. (I tested with download.dojotoolkit.org rather than google to prove that we don't need to point to a build, or a special XD version.)
comment:5 Changed 8 years ago by
Summary: | adding BASE tag to test file should load dojo → ability to point to a dojo release at an arbitrary location |
---|---|
Type: | defect → enhancement |
Changing summary to (hopefully) reflect the true intention of this ticket.
Hmm, this sounds like it would not work in any browser: if you are pointing to Dojo on a different domain than the page you are testing, then you will need to use an xdomain build.
Are you saying you expect the configuration of dojo.baseUrl to take BASE tag paths into account? If so, to date it has not, and I am a bit wary of doing so. setting djConfig.baseUrl should be sufficient. I am reticent to put in DOM parsing to try to find BASE tags since it is a minority use case.