aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Tests: Don't test synchronous XHR on unload in ChromeMichał Gołębiowski-Owczarek2019-10-281-8/+13
| | | | | | | | | | Chrome 78 dropped support for synchronous XHR requests inside of beforeunload, unload, pagehide, and visibilitychange event handlers. See https://bugs.chromium.org/p/chromium/issues/detail?id=952452 Closes gh-4536 (cherry picked from commit c5b48c8caa58e7b73164ac033bf726a072903708)
* Build: Run tests on Travis only on browsers defined in the configMichał Gołębiowski-Owczarek2019-10-221-2/+4
| | | | | | The environmental variable BROWSERS was being created but it wasn't read in the list of browsers to pass to Karma. Closes gh-4532
* Build: Run tests on Firefox ESR as wellMichał Gołębiowski-Owczarek2019-10-221-0/+7
| | | | | | Closes gh-4530 (cherry picked from commit 0a73b94a21d4c30b5598b95923dc73d640e07b99)
* Build: Run tests on Node.js 13 in addition to 8, 10 & 12Michał Gołębiowski-Owczarek2019-10-221-0/+1
| | | Closes gh-4528
* Build: Run tests on Travis on FirefoxHeadless as wellMichał Gołębiowski-Owczarek2019-10-212-9/+9
| | | | | | | | | | Also, run them on both ChromeHeadless & FirefoxHeadless locally on `grunt karma:main`. Plus, so far, the chrome addons were installed for all the jobs, even the ones that weren't used for browser testing. Changing that makes those jobs faster. Closes gh-4524
* 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
* Docs: Update most URLs to HTTPSMichał Gołębiowski-Owczarek2019-10-219-29/+29
| | | Closes gh-4511
* Selector: Add a test for throwing on post-comma invalid selectorsMichał Gołębiowski-Owczarek2019-10-211-1/+2
| | | | | | | | | | | | | Sizzle's PR jquery/sizzle#456 introduced a test catching not throwing on badly-escaped identifiers by Firefox 3.6-5. Unfortunately, it was placed just before a test Opera 10-11 failed, making Opera fail quicker and not adding a post-comma invalid selector to rbuggyQSA. The issue was fixed in jquery/sizzle#463. This jQuery commit backports the test that Sizzle PR added as no workarounds are needed in browsers jQuery supports. Closes gh-4516 Ref jquery/sizzle#456 Ref jquery/sizzle#463
* Tests: Stop using jQuery.find in testsMichał Gołębiowski-Owczarek2019-10-212-109/+109
| | | | | This prepares us for possibly hiding jQuery.find in jQuery 4.0. Closes gh-4517
* CSS: Workaround buggy getComputedStyle on table rows in IE/EdgeMichał Gołębiowski-Owczarek2019-10-144-9/+84
| | | | Fixes gh-4490 Closes gh-4506
* Selector: Make selectors with leading combinators use qSA againMichał Gołębiowski-Owczarek2019-10-141-1/+4
| | | | | | | | | | | | | | An optimization added in jquery/sizzle#431 skips the temporary IDs for selectors not using child or descendant combinators. For sibling combinators, though, this pushes a selector with a leading combinator to qSA directly which crashes and falls back to a slower Sizzle route. This commit makes selectors with leading combinators not skip the selector rewriting. Note that after jquery/jquery#4454 & jquery/sizzle#453, all modern browsers other than Edge leverage the :scope pseudo-class, avoiding temporary id attributes. Closes gh-4509 Ref jquery/sizzle#431
* Build: Require strict mode in Node.js scripts via ESLintMichał Gołębiowski-Owczarek2019-10-0911-14/+24
| | | | | | | | So far, only browser-based JS files were required to be in strict mode (in the function form). This commit adds such a requirement to Node.js scripts where the global form is preferred. All Node.js scripts in sloppy mode were converted to strict mode. Closes gh-4499
* Manipulation:Selector: Use the nodeName util where possible to save sizeMichał Gołębiowski-Owczarek2019-10-082-19/+18
| | | | | Saves 20 bytes. Closes gh-4504
* Docs: Convert link to Homebrew from HTTP to HTTPSChristian Oliff2019-10-071-1/+1
| | | | | `http://brew.sh/` -> `https://brew.sh/` Closes gh-4501
* Build: Support jquery-release --dry-run flagMichał Gołębiowski-Owczarek2019-10-051-1/+2
| | | | | | | Without this change passing `--dry-run` to jquery-release still pushes to the jquery-dist repository which is dangerous as one can assume `--dry-run` to be safe from external side effects. Close gh-4498
* Build: Stop copying src/core.js to dist on releaseMichał Gołębiowski-Owczarek2019-10-041-4/+7
| | | | | | | | File `src/core.js` has started erroneously being copied to `dist/` in gh-2981. Fixes gh-4489 Closes gh-4492 Ref gh-2979 Ref gh-2981
* Release: Update AUTHORS.txtMichał Gołębiowski-Owczarek2019-09-262-0/+4
| | | | | | | | | After recent merging of Sizzle & jQuery AUTHORS.txt, the `grunt authors` task doesn't provide meaningful as there's no obvious connection between current AUTHORS.txt contents & the desired one. Adding two new entries should make it easier (plus, it makes it possible to test jquery-release on current master). Apart from that, the commit adds a missing .mailmap entry for Shashanka Nataraj.
* Ajax: Do not execute scripts for unsuccessful HTTP responsesSean Robinson2019-09-264-0/+145
| | | | | | | | | The script transport used to evaluate fetched script sources which is undesirable for unsuccessful HTTP responses. This is different to other data types where such a convention was fine (e.g. in case of JSON). Fixes gh-4250 Closes gh-4379
* Core: Use Array.prototype.flat where supportedAhmed.S.ElAfifi2019-09-255-14/+39
| | | | | | | | | | | Calling `Array.prototype.concat.apply( [], inputArray )` to flatten `inputArray` crashes for large arrays; using `Array.prototype.flat` avoids these issues in browsers that support it. In case it's necessary to support these large arrays even in older browsers, a polyfill for `Array.prototype.flat` can be loaded. This is already being done by many applications. Fixes gh-4320 Closes gh-4459
* Selector: Use shallow document comparisons to avoid IE/Edge crashesMichał Gołębiowski-Owczarek2019-09-251-13/+24
| | | | | | | | | IE/Edge sometimes crash when comparing documents between frames using the strict equality operator (`===` & `!==`). Funnily enough, shallow comparisons (`==` & `!=`) work without crashing. Fixes gh-4441 Closes gh-4471
* Core: Remove private copies of push, sort & splice from the jQuery prototypeMichał Gołębiowski-Owczarek2019-09-244-13/+15
| | | Closes gh-4473
* Core: Implement .even() & .odd() to replace POS :even & :oddMichał Gołębiowski-Owczarek2019-09-242-0/+24
| | | | | | `:even` & `:odd` are deprecated since jQuery 3.4.0 & will be removed in 4.0.0. The new `even()` & `odd()` methods will make the migration easier. Closes gh-4485
* Deprecated: Fix AMD parameter orderMichał Gołębiowski-Owczarek2019-08-311-1/+1
| | | | Ref gh-4461
* Selector: reduce size, simplify setDocumentMichał Gołębiowski-Owczarek2019-08-263-130/+128
| | | | | | | | | | | 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
* Ajax: Simplify jQuery.ajaxSettings.xhrMichał Gołębiowski-Owczarek2019-08-261-3/+1
| | | | | | | | | | | | | | | Previously, jQuery.ajaxSettings.xhr, contents were wrapped in a try-catch as we defined jQuery.support.ajax & jQuery.support.cors executed during the jQuery load and we didn't want to crash if IE had native XHR disabled (which is possible). While jQuery hasn't supported the ActiveX-based XHR since 2.0, jQuery with XHR disabled could still be used for its other features in such a crippled browser. Since gh-4347, jQuery.support.ajax & jQuery.support.cors no longer exist, so we don't need the try-catch anymore. Fixes gh-1967 Closes gh-4467 Ref gh-4347
* Build: Remove the external directory, read from node_modules directlyMichał Gołębiowski-Owczarek2019-08-2612-41508/+10
| | | | | | Now that Sizzle is gone & we use npm, we can read from node_modules directly and skip the setup that copies some files to the external directory. Closes gh-4466
* Core: Deprecate jQuery.trimShashanka Nataraj2019-08-225-31/+30
| | | | | Fixes gh-4363 Closes gh-4461
* Tests: Port changes from SizzleRichard Gibson2019-08-201-3/+11
| | | | Ref https://github.com/jquery/sizzle/pull/450 Closes gh-4464
* Selector: Leverage the :scope pseudo-class where possibleMichał Gołębiowski-Owczarek2019-08-194-18/+107
| | | | | | | | | | | | | | | | | | | 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
* Tests: Fix a comment in testinit.jsMichał Gołębiowski-Owczarek2019-08-191-1/+0
| | | | | | | A copied comment line was accidentally left out above the line defining `QUnit.jQuerySelectorsPos`, making the sentence nonsense. This commit removes that line. Closes gh-4458
* Tests: update npo.js and include unminified source insteadTimmy Willison2019-08-122-2/+370
| | | | Close gh-4446 Ref gh-4445
* Selector: Bring back querySelectorAll shortcut usageMichał Gołębiowski-Owczarek2019-08-091-2/+1
| | | | | | | Due to a faulty IE 8 workaround removal, the fast path qSA mode was skipped when jQuery's find was called on an element node - i.e. in most cases. 😱 Ref gh-4395 Closes gh-4452
* Selector: Inline Sizzle into the selector moduleMichał Gołębiowski-Owczarek2019-07-2941-2965/+2174
| | | | | | | | | | | | | | | | | | 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
* Selector: Port Sizzle tests to jQueryMichał Gołębiowski-Owczarek2019-06-2611-160/+1884
| | | | | | | Apart from porting most Sizzle tests to jQuery (mostly to its selector module), this commit fixes selector-native so that a jQuery custom compilation that excludes Sizzle passes all tests as well. Closes gh-4406
* Build: ESLint: forbid unused function parametersMichał Gołębiowski-Owczarek2019-05-1319-37/+27
| | | | | | | | | | | | | This commit requires all function parameters to be used, not just the last one. In cases where that's not possible as we need to match an external API, there's an escape hatch of prefixing an unused argument with `_`. This change makes it easier to catch unused AMD dependencies and unused parameters in internal functions the API of which we may change at will, among other things. Unused AMD dependencies have been removed as part of this commit. Closes gh-4381
* Build: Fix the regex parsing AMD var-modules (#4389)Michał Gołębiowski-Owczarek2019-05-131-1/+1
| | | | | | | | | | | | | | | | The previous regex caused the final jQuery binary to have syntax errors for var-modules with names starting with "return". For example, the following module wouldn't work when the file is named `returnTrue.js`: ```js define( function() { "use strict"; return function returnTrue() { return true; }; } ); ``` Closes gh-4389
* Core: Remove IE-specific support tests, rely on document.documentModeMichał Gołębiowski-Owczarek2019-05-1327-465/+293
| | | | | | | Also, update some tests to IE-sniff when deciding whether to skip a test. Fixes gh-4386 Closes gh-4387
* Traversing: Fix `contents()` on `<object>`s with children in IEMichał Gołębiowski-Owczarek2019-05-081-2/+9
| | | | | | | | | The original fix didn't account for the fact that in IE `<object>` elements with no `data` attribute have an object `contentDocument`. The fix leverages the fact that this special object has a null prototype. Closes gh-4390 Ref gh-4384 Ref gh-4385
* Traversing: Fix `contents()` on `<object>`s with childrenPat O'Callaghan2019-05-062-1/+14
| | | | Fixes gh-4384 Closes gh-4385
* Effect: Fix a unnecessary conditional statement in .stop()Wonseop Kim2019-05-011-1/+1
| | | | | | | | | Because of the above conditional, the 'type' variable has a value of type 'string' or undefined. Therefore, boolean comparisons for 'type' variable is always unnecessary because it return true. The patch removed the unnecessary conditional statement. Fixes gh-4374 Closes gh-4375
* Build: Fix AMD dependencies in curCSSMichał Gołębiowski-Owczarek2019-04-302-8/+1
| | | | | | | | | A leftover `rboxStyle` was left in the wrapper parameters but not in the dependency array, causing `getStyles` to be undefined in AMD mode. Since `rboxStyle` is no longer used, it's now removed. Ref gh-4347 Closes gh-4380
* Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJSMichał Gołębiowski-Owczarek2019-04-2967-1431/+515
| | | | | | | | | | | Also, update support comments format to match format described in: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197 with the change from: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-448998379 (open-ended ranges end with `+`). Fixes gh-3950 Fixes gh-4299 Closes gh-4347
* Tests: Restrict an event test fallback to TestSwarmRichard Gibson2019-04-291-1/+1
| | | | Closes gh-4357
* Core: Remove deprecated jQuery APIsMichał Gołębiowski-Owczarek2019-04-296-497/+14
| | | | Fixes gh-4056 Closes gh-4364
* Tests: Fix the new focusin/focusout test in IEMichał Gołębiowski-Owczarek2019-04-291-44/+59
| | | | | | In IE, focus & blur events fire asynchronously, the test now accounts for that. Ref gh-4362
* Event: Stop shimming focusin & focusout eventsMichał Gołębiowski-Owczarek2019-04-296-93/+35
| | | | | | | | | | | Latest versions of all browsers now implement focusin & focusout natively and they all converged on a common event order so it doesn't make much sense for us to normalize it to a different order anymore. Note that it means we no longer guarantee that focusin fires before focus and focusout before blur. Fixes gh-4300 Closes gh-4362
* Data: Separate data & css/effects camelCase implementationsMichał Gołębiowski-Owczarek2019-04-297-18/+68
| | | | | | | | The camelCase implementation used by the data module no longer turns `-ms-foo` into `msFoo` but to `MsFoo` now. This is because `data` is supposed to be a generic utility not specifically bound to CSS use cases. Fixes gh-3355 Closes gh-4365
* Event: Prevent leverageNative from registering duplicate dummy handlersRichard Gibson2019-04-291-5/+5
| | | | | | (cherry-picked from 6c1e7dbf7311ae7c0c31ba335fe216185047ae5f) Closes gh-4353
* Event: Fix handling of multiple async focus eventsRichard Gibson2019-04-292-12/+61
| | | | | | | (cherry-picked from 24d71ac70406f522fc1b09bf7c4025251ec3aee6) Fixes gh-4350 Closes gh-4354
* Build: Test on Node.js 12, stop testing on Node.js 6 & 11Michał Gołębiowski-Owczarek2019-04-231-2/+1
| | | Closes gh-4369