|
1 | 1 | /*! |
2 | | - * Sizzle CSS Selector Engine v2.2.0 |
| 2 | + * Sizzle CSS Selector Engine v2.2.1 |
3 | 3 | * http://sizzlejs.com/ |
4 | 4 | * |
5 | 5 | * Copyright jQuery Foundation and other contributors |
6 | 6 | * Released under the MIT license |
7 | 7 | * http://jquery.org/license |
8 | 8 | * |
9 | | - * Date: 2015-04-10 |
| 9 | + * Date: 2015-10-17 |
10 | 10 | */ |
11 | 11 | (function( window ) { |
12 | 12 |
|
@@ -191,7 +191,7 @@ try { |
191 | 191 | } |
192 | 192 |
|
193 | 193 | function Sizzle( selector, context, results, seed ) { |
194 | | - var m, i, elem, nid, match, groups, newSelector, |
| 194 | + var m, i, elem, nid, nidselect, match, groups, newSelector, |
195 | 195 | newContext = context && context.ownerDocument, |
196 | 196 |
|
197 | 197 | // nodeType defaults to 9, since context defaults to document |
@@ -292,8 +292,9 @@ function Sizzle( selector, context, results, seed ) { |
292 | 292 | // Prefix every selector in the list |
293 | 293 | groups = tokenize( selector ); |
294 | 294 | i = groups.length; |
| 295 | + nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; |
295 | 296 | while ( i-- ) { |
296 | | - groups[i] = "[id='" + nid + "'] " + toSelector( groups[i] ); |
| 297 | + groups[i] = nidselect + " " + toSelector( groups[i] ); |
297 | 298 | } |
298 | 299 | newSelector = groups.join( "," ); |
299 | 300 |
|
@@ -380,7 +381,7 @@ function assert( fn ) { |
380 | 381 | */ |
381 | 382 | function addHandle( attrs, handler ) { |
382 | 383 | var arr = attrs.split("|"), |
383 | | - i = attrs.length; |
| 384 | + i = arr.length; |
384 | 385 |
|
385 | 386 | while ( i-- ) { |
386 | 387 | Expr.attrHandle[ arr[i] ] = handler; |
@@ -503,10 +504,9 @@ setDocument = Sizzle.setDocument = function( node ) { |
503 | 504 | docElem = document.documentElement; |
504 | 505 | documentIsHTML = !isXML( document ); |
505 | 506 |
|
506 | | - // Support: IE 9 - 11 |
| 507 | + // Support: IE 9-11, Edge |
507 | 508 | // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) |
508 | | - // Limit the fix to IE with document.documentMode and IE >=9 with document.defaultView |
509 | | - if ( document.documentMode && (parent = document.defaultView) && parent.top !== parent ) { |
| 509 | + if ( (parent = document.defaultView) && parent.top !== parent ) { |
510 | 510 | // Support: IE 11 |
511 | 511 | if ( parent.addEventListener ) { |
512 | 512 | parent.addEventListener( "unload", unloadHandler, false ); |
|
0 commit comments