【问题标题】:Dojo fails to load from google's CDN using Chrome; produces Uncaught illegal accessDojo 无法使用 Chrome 从 google 的 CDN 加载;产生未捕获的非法访问
【发布时间】:2010-10-16 06:58:03
【问题描述】:

当我从 google 的 CDN 加载 dojo 1.4 时,我收到以下错误:

native string.js:183 未捕获的非法访问

这仅在使用 Chrome 时大约一半的刷新时发生,其他时候它工作正常。我已验证该问题在运行 Chrome 的多台 Windows 机器上重现。

我正在使用以下代码来创建我的道场 dijits:

<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/tundra/tundra.css">

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" djConfig="parseOnLoad: true"> 
</script> 

<script type="text/javascript"> 
    dojo.require("dijit.layout.TabContainer");
    dojo.require("dijit.layout.ContentPane");
    dojo.require("dijit.Dialog");
    dojo.require("dijit.form.DateTextBox");
</script> 

有什么想法吗?

【问题讨论】:

  • 哪个浏览器?知道原生 string.js 是什么吗?我们怎样才能重现这个?
  • 我更新了帖子以更清楚地反映问题。我不知道原生 string.js 是什么;在检查器中,它说它位于“chrome://devtools/native%20string.js”,这让我很困惑。

标签: dojo cdn


【解决方案1】:

我没有适合您的解决方案,但这似乎是 Windows 上的 Chrome 4.0.249.89 中的一个错误(我已经确认 XP),并且与他们的 CDN 托管版本的 Dojo 1.4 无关(我在本地运行)。

无论以前的 Chome v4 版本是什么,都没有这个问题。我通过 Chrome 错误报告工具将其报告为错误。

另外,FWIW,Linux (Ubuntu 9.1) 下的 Chrome "5.0.322.2 dev" 没有这个问题。

【讨论】:

  • 哦,还有,到目前为止,它似乎只与使用 dijit.Dialog 有关,虽然我还没有彻底测试过这个理论。
  • 我已经在 Google CDN 以及本地运行的副本中确认了这个问题。我正在运行 Windows 7,但不是 Dev 版本。我可能会尝试切换到该频道以查看它在 Windows 上的工作方式。
  • 出于好奇,在处理很长的字符串时会发生这种情况吗?尝试 JSON 解析一千多个字符的字符串时,我在 Chrome 中看到非法访问异常。
猜你喜欢
  • 2017-05-02
  • 2011-12-23
  • 2017-06-23
  • 1970-01-01
  • 2013-07-31
  • 2012-03-29
  • 2011-02-23
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多