0

我一直在尝试使用jsperf.comjquery 和 ext js 来测试一些代码。它在 Firefox 和 chrome 中运行良好,但其中很多在 Internet Explorer 中无法运行。有谁知道 jsperf 的任何替代品适用于 IE 吗?

在 chrome、firefox 和 IE 中试试这个例子。它在 chrome 和 firefox 中运行良好,但是一旦我在 IE 中尝试它,它就会给我一个错误。更让我困惑的是,我可以自己在 IE 中打开它,但不能通过 jsperf。

4

1 回答 1

10

我是jsPerf的创造者的创建者。

jsPerf 可以在各种浏览器和设备上工作。如果您的测试用例由于某种原因不能在 IE 中运行,这并不意味着 jsPerf 已损坏——您的测试用例可能有问题。

您的测试用例抛出“<code>jQuery is undefined”错误。我猜是因为这个:

<script src="https://raw.github.com/chubicle/Javascript-Framework-Benchmarking/master/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://raw.github.com/chubicle/Javascript-Framework-Benchmarking/master/easyui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

您可能应该包括jquery.easyui.min.js after jquery.min.js,而不是相反。

更新:我已经为您编辑了测试用例,现在它工作正常。

于 2011-08-12T05:55:04.520 回答