我现在只是在我的ASP.net网页(实际上是Site.Master文件)中包含了jQuery(1.9.1,但旧的1.8.3表现方式相同)。一切工作正常在IE9/Win7-64下运行,但自从我升级到IE10(仍然Win7-64),现在当我在本地运行网页,选择Internet Explorer并从Visual Studio中运行时,我遇到了异常。在IE10/Win7上运行jQuery崩溃
jquery-1.9.1.js文件的第4224行出现异常。
// Opera 10-12/IE8 - ^= $= *= and empty values
// Should not select anything
div.innerHTML = "<input type='hidden' i=''/>";
if (div.querySelectorAll("[i^='']").length) {
rbuggyQSA.push("[*^$]=" + whitespace + "*(?:\"\"|'')");
}
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
// IE8 throws error here and will not see later tests
if (!div.querySelectorAll(":enabled").length) {
rbuggyQSA.push(":enabled", ":disabled");
}
// Opera 10-11 does not throw on post-comma invalid pseudos
div.querySelectorAll("*,:x");
rbuggyQSA.push(",.*:");
旧的和新的jQuery似乎都无法正确处理Windows 7上的IE10。我在10-11剧院崩溃,这很有趣。
我也看到在4242
if ((support.matchesSelector = isNative((matches = docElem.matchesSelector ||
docElem.mozMatchesSelector ||
docElem.webkitMatchesSelector ||
docElem.oMatchesSelector ||
docElem.msMatchesSelector)))) {
assert(function(div) {
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9)
support.disconnectedMatch = matches.call(div, "div");
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call(div, "[s!='']:x");
rbuggyMatches.push("!=", pseudos);
});
下面是错误的一个崩溃:
Exception was thrown at line 4224, column 4 in http://localhost:49928/jquery/jquery-1.9.1.js
0x800a139e - JavaScript runtime error: SyntaxError
Source line: div.querySelectorAll("*,:x");
任何人有什么想法?
什么是例外?您发布的代码中哪一行是4224行? – 2013-02-28 20:36:32
我将对话框中的异常复制到我的问题中,参见上文。 – 2013-02-28 21:08:04
根据jQuery团队的说法,这很好,因为它是预期的。他们在更高层次上发现异常并自行处理。跛脚,但这是情况 – 2013-07-11 12:24:08