Opened 14 years ago

Closed 10 years ago

Last modified 10 years ago

#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:


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=""/>

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:
Line: 16
Error: dojo.declare is not a function
Source File:
Line: 16
Error: dojo.Color is undefined
Source File:
Line: 16
Error: Could not load 'dijit.Menu'; last tried '../dijit/Menu.js'
Source File:
Line: 16
Error: dojo.connect is not a function
Source File:
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 14 years ago by James Burke

Milestone: tbdfuture

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.

comment:2 Changed 14 years ago by deanw

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 "" ... which contains the following text ...

"Use the following script tag to use Dojo 1.2.0: <script type="text/javascript" src=""></script>

... so I think we're ok now.

comment:3 Changed 10 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

is this ticket still relevant?

comment:4 Changed 10 years ago by bill

Cc: Rawld Gill added
Component: GeneralLoader
Keywords: needsreview removed
Milestone: future1.7
Resolution: fixed
Status: newclosed

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" 
data-dojo-config="parseOnLoad: false, async:true"></script>

and it loads everything from that (I tested with rather than google to prove that we don't need to point to a build, or a special XD version.)

Last edited 10 years ago by bill (previous) (diff)

comment:5 Changed 10 years ago by bill

Summary: adding BASE tag to test file should load dojoability to point to a dojo release at an arbitrary location
Type: defectenhancement

Changing summary to (hopefully) reflect the true intention of this ticket.

Note: See TracTickets for help on using tickets.