I’m using PrimeFaces (3.2), but the question is related to Chrome I think.
Everything is ok unless I opened the Chrome debug window. I.e., if I close the debug window, no error occurred, no exception at all (see below, exception is try/catch-ed).
However, if I openned the Chrome debug window, and do something with the web page, then the debugger paused at following location:
if ( !Sizzle.isXML( node ) ) {
try {
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
var ret = matches.call( node, expr ); <----- Paused here.
// IE 9's matchesSelector returns false on disconnected nodes
if ( ret || !disconnectedMatch ||
// As well, disconnected nodes are said to be in a document
// fragment in IE 9, so check for that
node.document && node.document.nodeType !== 11 ) {
return ret;
}
}
} catch(e) {}
}
Here node=<div ... and expr=:hidden.
After investigated to the jQuery source code, it seems Chrome don’t support node.querySelectorAll(':hidden'),.
Why Chrome will pause here, in the try/catch block? And how to make it not pause any more?
Chrome version: 17
Have you unknowingly enabled “pause on exceptions” option in the Scripts tab of the Developer Console? It’s the fourth icon from the left in this screenshot:
If the icon is highlighted blue, that means it’s enabled, and any exceptions will cause the script to pause as if you’d set a breakpoint there, so you can debug it.