我只是NuGet将我的jquery从1.8.3更新到3.1.1.然后我不断在每个页面上收到此错误.环顾四周后,似乎jquery多次执行,但在我查看开发人员工具时似乎并非如此.
所以,这就是它发生的地方.
jQuery.Deferred.exceptionHook = function( error, stack ) {
// Support: IE 8 - 9 only
// Console exists when dev tools are open, which can happen at any time
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
}
};
jQuery.readyException = function( error ) {
window.setTimeout( function() {
throw error;
} );
};
Run Code Online (Sandbox Code Playgroud)
在线"window.console.warn ...."它有警告 - jQuery.Deferred异常:a(...).parents(...).andSelf不是函数
并且错误被抛出"抛出的错误" - 未捕获的TypeError:a(...).parents(...).andSelf不是函数
知道为什么会这样吗?