Dojo中的超时错误运行.html页面时

时间:2013-04-11 03:21:52

标签: dojo

我无法在运行时在浏览器中看到此错误。我有一个运行dojo和相关javascript的html页面,每当我尝试加载页面时,我都会在Firebug控制台中看到它:

错误:超时 makeError()dojo.js(第106行) startTimer / timerId<()dojo.js(第1500行)

return mix(new Error(error), {src:"dojoLoader", info:info});

引用核心dojo.js库中的这一行:

makeError = function(error, info){
return mix(new Error(error), {src:"dojoLoader", info:info});
}, 

我也遇到了这个错误:

Error: Could not load class 'gt.widget.HtmlContainer
[Break On This Error]   

if (eventData)

在这个html页面的底部,由于某种原因,它在Webstorm attribute "data-dojo-type" is not allowed here中说,虽然我在大多数其他.html文件中看到了这种设置,但它们确实运行了:

...
    </script>
</head>
<body class="base">
    <div class="heading">Dependent Fields Data Test</div>
    <div id="container" data-dojo-type="gt.widget.HtmlContainer">
    </div>
</body>
</html>

不知道为什么它超时以及为什么装载机有任何问题。以下是.html页面第一部分的示例:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Unit Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <script type="text/javascript" src="../config-tests.js"></script>
    <script type="text/javascript" src="../../../toolkit/dojo/dojo.js"></script>
    <script type="text/javascript">
        require
        ([
            "dojo/ready",
            "dojo/on",
            "doh/runner",
            "gt/mvc/MvcInitializer",
            "gt/widget/HtmlContainer",
            "gt/util/runModeUtil",
            "gt/sub/topic",
            "gt/sub/coreTopics",
            "gt/tests/employee/employeeData"
        ], function (ready, on, runner, MvcInitializer, HtmlContainer, runModeUtil, topic, coreTopics, dependentData)
        {
            ready(function() 
            {
                var _topicHandle = null;
....

更新

现在,当我在firefox中运行.htm页面时,我也会看到这样的错误:

对此绝对无能为力。我从未使用过Dojo,但这看起来很荒谬。

Error in parsing value for 'font'.  Declaration dropped. C:/.../js/toolkit/dojox/widget/Toaster/Toaster.css:42 
Error: [Exception... "Access to restricted URI denied"  code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "file:///C:/.../js/toolkit/dojo/_base/xhr.js Line: 735"] 
Error: [Exception... "Access to restricted URI denied"  code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "file:///C:/..../js/toolkit/dojo/_base/xhr.js Line: 735"] 
Error: [Exception... "Access to restricted URI denied"  code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "file:///C:/..../js/toolkit/dojo/_base/xhr.js Line: 735"] 
Error: [Exception... "Access to restricted URI denied"  code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "file:///C:/.../js/toolkit/dojo/_base/xhr.js Line: 735"] 
Error: [Exception... "Access to restricted URI denied"  code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "file:///C:/.../js/toolkit/dojo/_base/xhr.js Line: 735"] 
Error: [Exception... "Access to restricted URI denied"  code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "file:///C:/..../js/toolkit/dojo/_base/xhr.js Line: 735"] 
Error: timeout 
src: dojoLoader 
info: [object Object] 
fileName: file:///C:/...../js/toolkit/dojo/dojo.js 
lineNumber: 106 
columnNumber: 3 
. 
Key event not available on some keyboard layouts: key="b" modifiers="accel,alt" 

0 个答案:

没有答案