diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-09-21 09:40:57 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-09-21 09:40:57 -0400 |
commit | 03d95530b57ebcc46329240f170dd85ce79f871b (patch) | |
tree | 8bdade006bafb54befc3053ae5d265a03251c668 /src | |
parent | 61511d5ab35611b50bc93b8e9ecfb35e561bee1e (diff) | |
download | jquery-03d95530b57ebcc46329240f170dd85ce79f871b.tar.gz jquery-03d95530b57ebcc46329240f170dd85ce79f871b.zip |
Remove the rarely-used pseudos from quickis.html
The cutting will continue until file size is improved.
Diffstat (limited to 'src')
-rw-r--r-- | src/event.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/event.js b/src/event.js index 04589bcfc..02c26dc23 100644 --- a/src/event.js +++ b/src/event.js @@ -7,20 +7,14 @@ var rnamespaces = /\.(.*)$/, rescape = /[^\w\s.|`]/g, rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, rhoverHack = /\bhover(\.\S+)?/, - rquickIs = /^([\w\-]+)?(?:#([\w\-]+))?(?:\.([\w\-]+))?(?:\[([\w+\-]+)=["']?([\w\-]*)["']?\])?(?::(first-child|last-child|empty))?$/, - quickPseudoMap = { - "empty": "firstChild", - "first-child": "previousSibling", - "last-child": "nextSibling" - }, + rquickIs = /^([\w\-]+)?(?:#([\w\-]+))?(?:\.([\w\-]+))?(?:\[([\w+\-]+)=["']?([\w\-]*)["']?\])?$/, quickParse = function( selector ) { var quick = rquickIs.exec( selector ); if ( quick ) { - // 0 1 2 3 4 5 6 - // [ _, tag, id, class, attrName, attrValue, :(empty first-child last-child) ] + // 0 1 2 3 4 5 + // [ _, tag, id, class, attrName, attrValue ] quick[1] = ( quick[1] || "" ).toLowerCase(); quick[3] = quick[3] && new RegExp( "\\b" + quick[3] + "\\b" ); - quick[6] = quickPseudoMap[ quick[6] ]; } return quick; }, @@ -29,8 +23,7 @@ var rnamespaces = /\.(.*)$/, (!m[1] || elem.nodeName.toLowerCase() === m[1]) && (!m[2] || elem.id === m[2]) && (!m[3] || m[3].test( elem.className )) && - (!m[4] || elem.getAttribute( m[4] ) == m[5]) && - (!m[6] || !elem[ m[6] ]) + (!m[4] || elem.getAttribute( m[4] ) == m[5]) ); }, useNativeMethod = function( event ) { |