aboutsummaryrefslogtreecommitdiffstats
path: root/src/selector
Commit message (Collapse)AuthorAgeFilesLines
* Selector: Remove the "a:enabled" workaround for Chrome <=77Michał Gołębiowski-Owczarek2019-12-161-9/+0
| | | | | | | Remove the workaround for a broken `:enabled` pseudo-class on anchor elements in Chrome <=77. These versions of Chrome considers anchor elements with the `href` attribute as matching `:enabled`. Closes gh-4569
* Selector: Make empty attribute selectors work in IE againMichał Gołębiowski-Owczarek2019-11-182-1/+17
| | | | | | | | | | qSA in IE 11/Edge often (but not always) don't find elements with an empty name attribute selector (`[name=""]`). Detect that & fall back to Sizzle traversal. Interestingly, IE 10 & older don't seem to have the issue. Fixes gh-4435 Closes gh-4510
* Core: Migrate from AMD to ES modules 🎉Michał Gołębiowski-Owczarek2019-11-185-41/+11
| | | | | | | | | | | | | | | | | | | | | | Migrate all source AMD modules to ECMAScript modules. The final bundle is compiled by a custom build process that uses Rollup under the hood. Test files themselves are still loaded via RequireJS as that has to work in IE 11. Tests can now be run in "Load as modules" mode which replaces the previous "Load with AMD" option. That option of running tests doesn't work in IE and Edge as it requires support for dynamic imports. Some of the changes required by the migration: * check `typeof` of `noGlobal` instead of using the variable directly as it's not available when modules are used * change the nonce module to be an object as ECMASscript module exports are immutable * remove some unused exports * import `./core/parseHTML.js` directly in `jquery.js` so that it's not being cut out when the `ajax` module is excluded in a custom compilation Closes gh-4541
* Selector: Use shallow document comparisons in uniqueSortMichał Gołębiowski-Owczarek2019-10-211-3/+16
| | | | | | | | | | | | | | IE/Edge sometimes crash when comparing documents between frames using the strict equality operator (`===` & `!==`). Funnily enough, shallow comparisons (`==` & `!=`) work without crashing. The change to shallow comparisons in `src/selector.js` was done in gh-4471 but relevant changes in `src/selector/uniqueSort.js` were missed. Those changes have landed in Sizzle in jquery/sizzle#459. Fixes gh-4441 Closes gh-4512 Ref gh-4471 Ref jquery/sizzle#459
* Core: Remove private copies of push, sort & splice from the jQuery prototypeMichał Gołębiowski-Owczarek2019-09-241-3/+4
| | | Closes gh-4473
* Selector: reduce size, simplify setDocumentMichał Gołębiowski-Owczarek2019-08-261-0/+30
| | | | | | | | | | | With new selector code doing less convoluted support tests, it was possible to extract a lot of logic out of setDocument & also reduce size. This commit also backports jquery/sizzle#439 that was reverted by mistake during a switch from JSHint + JSCS to ESLint. Closes gh-4462 Ref jquery/sizzle#442 Ref jquery/sizzle#439
* Selector: Leverage the :scope pseudo-class where possibleMichał Gołębiowski-Owczarek2019-08-191-0/+17
| | | | | | | | | | | | | | | | | | | The `:scope` pseudo-class[1] has surprisingly good browser support: Chrome, Firefox & Safari have supported if for a long time; only IE & Edge lack support. This commit leverages this pseudo-class to get rid of the ID hack in most cases. Adding a temporary ID may cause layout thrashing which was reported a few times in [the past. We can't completely eliminate the ID hack in modern browses as sibling selectors require us to change context to the parent and then `:scope` stops applying to what we'd like. But it'd still improve performance in the vast majority of cases. [1] https://developer.mozilla.org/en-US/docs/Web/CSS/:scope Fixes gh-4453 Closes gh-4454 Ref gh-4332 Ref jquery/sizzle#405
* Selector: Inline Sizzle into the selector moduleMichał Gołębiowski-Owczarek2019-07-293-0/+133
| | | | | | | | | | | | | | | | | | This commit removes Sizzle from jQuery, inlining its code & removing obsolete workarounds where applicable. The selector-native module has been removed. Further work on the selector module may decrease the size enough that it will no longer be necessary. If it turns out it's still useful, we'll reinstate it but the code will look different anyway as we'll want to share as much code as possible with the existing selector module. The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are sorted by their first contributions to either of the two repositories. The commit reduces the gzipped jQuery size by 1460 bytes compared to master. Closes gh-4395
* Reorganzing the jQuery source (first phase).John Resig2007-09-082-634/+0
|
* Added a new :animated selector - only selects elements that are currently ↵John Resig2007-09-081-1/+4
| | | | being animated.
* Integration of Mike Alsup's excellent form serialization code. The benefits ↵John Resig2007-09-051-22/+22
| | | | | | | | | | | | | | | | | | are as follows: - New method: .serializeArray() This returns an array of name/value pairs representing the contents of a form, or individual input elements. - Enhancement: .serialize() The results are correct now (as opposed to the mess from before), and allows you to serializes forms directly (rather than just the input elements). - Enhancement: .val() This now returns the correct value when dealing wih selects. Additionally, when dealing with multiple selects, it returns an array of values. Based upon Mike's code: http://malsup.com/jquery/form/comp/form.js and test suite: http://malsup.com/jquery/form/comp/test.html
* Removed all deprecated functionality for jQuery 1.2. A full list of what was ↵John Resig2007-09-042-92/+43
| | | | removed can be found here: http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-for-12/
* Removed all inline documentation. The current version of all documentation ↵John Resig2007-09-041-36/+0
| | | | is stored online, on the wiki: http://docs.jquery.com/
* Added support for a new :header psuedo-selector (only selects H1-H6 elements).John Resig2007-08-312-2/+7
|
* Fixed the issue where $("body").find("div#foo") would ignore the specified ↵John Resig2007-08-272-2/+4
| | | | tag name. (Bug #1543)
* Marked all the appropriate methods as being deprecated for the 1.1.4 release ↵John Resig2007-08-241-0/+7
| | | | (in preparation for 1.2).
* Fixed use of eval() and new Function() to work within the correct scope (and ↵John Resig2007-08-221-1/+1
| | | | not throw errors).
* Added the new :has() selector (Bug #1521)John Resig2007-08-212-2/+6
|
* Fix for a selector speed regression (calling a simple selector many times ↵John Resig2007-08-211-5/+12
| | | | | | | | | | resulted in a significant speed down). This has been fixed by breaking the RegExps out into the global scope. This required that a closure be implemented around the full jQuery script (which is now the case). Some simple changes were made in addition to the RegExp one, allowing for some greater flexibility on our part - and hopefully better compression. Speed results: http://dev.jquery.com/~john/ticket/1351/ vs. http://dev.jquery.com/~john/ticket/1351/113.html vs. http://dev.jquery.com/~john/ticket/1351/112.html
* Added a fix for IE returning comment nodes in * queries. I put the logic in ↵John Resig2007-08-191-1/+6
| | | | $.merge() but added a conditional such that the speed hit only effects IE users. (Bug #1155)
* The test for underscore selectors broke under Opera, so the element is now ↵John Resig2007-07-301-3/+12
| | | | loaded via Ajax and tested. (bug #1084)
* Added a fix for Safari's broken CSS getComputedStyle accessing. ↵John Resig2007-07-291-1/+1
| | | | Additionally, added a fix for Safari mis-reporting @selected for display: none options. The test suite is now completely passing in Safari 3. (Bug #1349)
* Integrated the custom fx test suite into the main test suite. All tests are ↵John Resig2007-07-291-11/+11
| | | | now run automatically. Removed the old suite, as it was no longer needed.
* $("#foo", xml) would always return an empty set, fixed (bug #877). ↵John Resig2007-07-251-1/+1
| | | | Additionally, a bug in jQuery.isXMLDoc(xmlDoc) was discovered, if the element was, in fact, an XML document.
* Added a fix for relative // - $("//div",this) (bug #1418)John Resig2007-07-252-2/+3
|
* Added a fix for h1 + h2 not working. (Bug #1361)John Resig2007-07-201-1/+1
|
* Final fix for Safari crasher (bug #1331).John Resig2007-07-061-1/+1
|
* Fix for Safari 1.3 crash (bug #1331).John Resig2007-07-051-1/+1
|
* fix little typo in commentEd Engelhardt2007-07-051-1/+1
|
* Added fix for broken child selectors in XML documents, bug #1346.John Resig2007-07-051-2/+2
|
* Added a fix for bug #1331, which caused Safari 1.3 to crash.John Resig2007-07-041-1/+1
|
* Fixed bug that prevented $= from working on elements that didn't have the ↵John Resig2007-07-041-1/+1
| | | | specified attribute.
* Who am I kidding |= is useless.John Resig2007-06-291-2/+2
|
* Added minor support for |= and ~= selectors.John Resig2007-06-291-2/+2
|
* Added fix for :nth-child(n).John Resig2007-06-291-1/+1
|
* Added fix for broken :only-child.John Resig2007-06-291-1/+1
|
* Added extra last-child test.John Resig2007-06-291-1/+2
|
* Added massive speed improvements to selectors. Also added support for ↵John Resig2007-06-291-60/+98
| | | | :nth-child(An+B) syntax.
* Fix for #1169Brandon Aaron2007-05-132-8/+10
|
* Rev [1827] broke the two XPath sibling selectors.John Resig2007-05-011-2/+2
|
* We're not adding new selector features in until a new full release. Please ↵John Resig2007-05-012-8/+2
| | | | discuss features like this in the dev mailing list, and in the bug tracker, before committing code.
* TDD. Broken test case, need to fix xpath parser...Corey Jewett2007-04-301-1/+2
|
* Query now throws no warnings under strict mode in Firefox (ticket #922). In ↵John Resig2007-04-291-15/+16
| | | | fixing this, revision [1771] was discovered and reverted (no API changes are being added in at this time), and a couple un-functioning test cases were fixed (array comparisions were being done for objects).
* Forgot to remove the test cases for XPath [n]. (Ticket #995)John Resig2007-04-281-5/+1
|
* Removed support for the XPath [n] - we weren't doing it right, and it would ↵John Resig2007-04-281-1/+1
| | | | actually require a lot of code to "do it right" (much more than what the feature is immediately worth). See ticket #995.
* Added support for finding elements that have underscores in their name ↵John Resig2007-04-282-5/+7
| | | | (along with other allowed characters). Fix for ticket #1084.
* Add RegExp style xpath attributes and testcases. e.g. [@foo =~ /bar/i] and ↵Corey Jewett2007-04-132-2/+7
| | | | [@foo !~ /bar/]
* Added a number of additional speed gains (we now hold our own against Dojo ↵John Resig2007-03-261-28/+35
| | | | and DOMQuery), touched up some of the selector code, fixed some minor bugs, fixed a bug with triggerEvent in Opera, fixed some more test case bugs.
* Opera is also vulnerable to the getElementById-returning-name issue, fixed ↵John Resig2007-03-251-7/+6
| | | | it there as well. Also had to tweak the UTF8 regexps to work in Safari (Safari doesn't support \uXXXX in RegExps, lame.)
* Fixed some more bugs with the test suite, made some minor file size tweaks ↵John Resig2007-03-252-16/+15
| | | | to the selector code.