Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7554605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:22:52+00:00 2026-05-30T11:22:52+00:00

When using Dojo 1.6, I can rename the core dojo package like so: <html>

  • 0

When using Dojo 1.6, I can “rename” the core dojo package like so:

<html>

<head>

<script type="text/javascript">
   djConfig = {
      baseUrl: 'https://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/',
      scopeMap: [
         [ 'dojo', 'myDojo' ]
      ]
   }
</script>
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js"></script>
</head>

<body>
<script type="text/javascript">
   if (typeof dojo != 'undefined') {
      document.write("Defined: dojo: " + dojo.version + '\n');
   }
   if (typeof myDojo != 'undefined') {
      document.write("Defined: myDojo: " + myDojo.version + '\n');
   }
</script>
</body>

</html>

The above prints “Defined: myDojo: 1.6.1…”. How can I accomplish the same thing in Dojo 1.7? Following the example here, I tried this test, to no avail:

<html>

<head>

<script type="text/javascript">
   dojoConfig = {
      baseUrl: 'dojo/1.7.2/dojo/',
      packages: [
         { name: 'myDojo',
           location: '../dojo',
           packageMap: {
              dojo: 'myDojo'
           }
         }
      ]
   }
</script>
<script src="dojo/1.7.2/dojo/dojo.js"></script>
</head>

<body>
<script type="text/javascript">
   if (typeof dojo != "undefined") {
      document.write("Defined: dojo: " + dojo.version + '\n');
   }
   if (typeof myDojo != "undefined") {
      document.write("Defined: myDojo: " + myDojo.version + '\n');
   }
</script>
</body>

</html>

This prints “Defined: dojo: 1.7.2…”. What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:22:53+00:00Added an answer on May 30, 2026 at 11:22 am

    to get the remapping of globals to work when using the source version, you need to set dojoConfig.async to something truthy and then you need to load the 'myDojo' package.

    http://jsfiddle.net/neonstalwart/44e56/ is a working example of the code below:

    <script type="text/javascript">
        // configure dojo
        dojoConfig = {
            async: 1,
            packages: [
                {
                    name: 'myDojo',
                    location: '../1.7.2',
                    // re-map globals to different names
                    packageMap: {
                        dojo: 'myDojo'
                    }
                }
            ],
            deps: ['myDojo'],
            callback: function () {
                if (typeof dojo != "undefined") {
                    alert("Defined: dojo: " + dojo.version + '\n');
                }
                if (typeof myDojo != "undefined") {
                    alert("Defined: myDojo: " + myDojo.version + '\n');
                }
            }
        };
    </script>
    <script type="text/javascript" src="https://raw.github.com/dojo/dojo/1.7.2/dojo.js"></script>
    

    ​

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following html to load dojo from Google's hosting. <script src=http://www.google.com/jsapi></script> <script
I'm loading data using dojo.io.script.get. Size of each request can be big and I
I'm looking at using the Dojo Objective Harness (DOH) for testing some custom JavaScript
I'm using dojo. I've got something like this: <a id=fooBar onclick=foo();bar();>Foo then Bar</a> I
I have a set of items that can be dragged / dropped using Dojo
I'm using dojo for our UI's, and would like to load certain part of
I have an HTML form using dojo and have the following code for a
I have a class for mouse events. I'm using dojo b/c I like its
Can you detect the browser the client is using with dojo? i want to
Dear All, I'm using dojo.declare to create classes in JavaScript. In one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.