Reputation: 41
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
Upvotes: 1
Views: 1236
Reputation: 18766
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.
Upvotes: 1