1

I have a problem when I'm using dojo with option async set false in IE, my application needs to work dojo in sync mode, see my code:

         <script>
        var dojoConfig = {
            async: false,
            packages: [{
                name: "ControleOO",
                location: location.pathname.replace(/\/[^/]*$/, '') + "/ControleOO"
            }]
        };
    </script>
    <script src="js/dojo/dojo.js"></script>

    <script>

     require(["dojo/_base/window", "ControleOO/Base", "ControleOO/Config", "ControleOO/Mouse"], function(win, Base, Config, Mouse){

        window.Base = new Base();

        window.map = window.Base.getMapa(window.Base);
        config = new Config('PROCEMPA'); //TODO Alterar para base desejada

        window.mouse = new Mouse();

     });

    </script>

When I run this page on IE the require method doesn't invoke but in other browsers the method is invoke fine.

This is a BUG or I don't know configure the correct way the DOJO lib?

Best Regards,

Renan

rbarbalho
  • 41
  • 2
  • 10

1 Answers1

1

If it works fine when your modules are not included, and this problem only exists in IE<9, you probably have written JavaScript that is not EcmaScript 3 compliant. The most common cause of non-compliant code is inadvertently leaving a trailing comma somewhere. See Are trailing commas in arrays and objects part of the spec? for more information.

Community
  • 1
  • 1
C Snover
  • 17,908
  • 5
  • 29
  • 39
  • I found the problem, in my modules I've special characters and Dojo converts the characters in others letters. Is it possible configure encoding/charset on Dojo to accept the special characters? – rbarbalho Aug 01 '13 at 17:47
  • Dojo does not and can not change the character encoding of JavaScript files. The browser is responsible for managing character encoding. This is why jslint reports “unsafe character” warnings when you use non-US-ASCII characters and tells you to use escape sequences instead. Usually you can get away with raw UTF-8 characters, though, so long as your server is correctly configured. – C Snover Aug 01 '13 at 19:39