我无法在浏览器的运行时克服这个错误。我有一个运行 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"