dojo更新导致奇怪的错误

时间:2013-09-02 11:16:59

标签: javascript dojo

我最近将我的项目从1.6.1更新到dojo版本1.6.2现在我一直在收到奇怪的错误而没有任何代码更改。

Chrome错误控制台:

Error parsing in _ContentSetter#Setter_DIV_0 
 /etermin/js/dojo-release-1.6.2/dojo/../dijit/layout/ContentPane.js:203
Error undefined running custom onLoad code: This deferred has already been resolved 
/etermin/js/dojo-release-1.6.2/dojo/../dijit/layout/ContentPane.js:142

Firefox错误控制台:

dojo.js (vrstica 324)
Error parsing in _ContentSetter#Setter_DIV_0
Error: Could not load class 'dijit.form.FileringSelect

dojo.js (vrstica 372)
Error undefined running custom onLoad code: This deferred has already been resolved

dojo.js文件中存在一个问题:如果我将其更改回1.6.1,则可以解决问题。但我想使用1.6.2版本

Plaease帮助和建议

更新: 我找到了一些奇怪的东西:

  var p = new dijit.MenuItem({
        label: "cut",
    })

  p.onClick = function() {
            dojo.xhrGet({
//some ajax call
});
}

不起作用。但是,如果我在ajax之前只提出一个简单的警报就行了。

 p.onClick = function() {
alert("123");
                dojo.xhrGet({
    //some ajax call
    });
}

2 个答案:

答案 0 :(得分:1)

为什么不将版本更新为1.9?遗产道场迟早不会再有效了,在谷歌托管图书馆里我找不到版本1.6.2 看一看: https://developers.google.com/speed/libraries/devguide 这还能用吗?你从哪里得到dojo.js?

为了防止菜单的发布时间,您可以在定义onClick 定义你的MenuItem。

看看:

var p = new dijit.MenuItem({
    label: "Menu Item With an icon",
    iconClass: "dijitEditorIcon dijitEditorIconCut",
    onClick: function(){alert('i was clicked')}
}));

此致,Miriam

答案 1 :(得分:1)

  

这是一个错误。

     

查看错误报告here ..

     

您必须修补dojo版本或将其升级到1.8或更高版本才能修复它。

     
    

如果您知道自己在玩什么,可以手动修复。

         

该修补程序位于here

  
     

您可以手动将其应用于当前的dojo版本以进行修复。

相关问题