jQuery的运行就崩溃IE10 / Win7的 [英] Running jQuery crashing on IE10/Win7

查看:341
本文介绍了jQuery的运行就崩溃IE10 / Win7的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我暂时只包括jQuery的(1.9.1,但老1.8.3表现方式相同),在我的ASP.net网页(的Site.Master文件实际上)。一切正常运行下IE9 / Win7-64但自从我升级到IE10(仍然Win7-64),现在当我在本地运行网页,选择Internet Explorer和Visual Studio中运行,我打个例外。

I am for the moment just including jQuery (1.9.1, but old 1.8.3 behaved the same way) in my ASP.net webpage (Site.Master file actually). Everything worked fine running under IE9/Win7-64 but ever since I upgraded to IE10 (still Win7-64), now when I run the webpage locally, selecting Internet Explorer and run from within Visual Studio, I hit an exception.

唯一的例外是jQuery开发,1.9.1.js文件的4224行。

The exception is on line 4224 of the jquery-1.9.1.js file.

// 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,这是有趣的。

jQuery, both old and new, seems to not handle IE10 on Windows 7 properly. I crash at Opera 10-11, which is interesting.

我也看到在4242崩溃

I also see a crash on 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");

任何人有任何想法?

Anybody have any thoughts?

推荐答案

jQuery开发团队使用在逻辑流某些情况下例外。
看到这个错误我申请了同样的问题与WinJS应用: http://bugs.jquery.com/ticket/14123

the jQuery team uses exceptions in certain situations for logic flow. See this bug I filed for the same problem with WinJS apps: http://bugs.jquery.com/ticket/14123

由于异常的处理,他们不认为这是一个问题。我这样做,因为它使调试应用程序的方式更难没有扔上打破集。

since the exception's handled, they don't consider it a problem. I do, since it makes debugging the app way harder without "break on throw" set.

所以,这就是问题所在。没有什么可以做的。

So, that's the problem. Nothing you can do about it.

这篇关于jQuery的运行就崩溃IE10 / Win7的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆