aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Event: Remove the event.which shimMichał Gołębiowski-Owczarek2020-08-261-32/+2
| | | | | | | | | | | All supported browsers implement this property by themselves. The shim was only needed for IE <9. Fixes gh-3235 Closes gh-4765 Ref gh-4755 (cherry picked from commit 1a5fff4c169dbaa2df72c656868bcf60ed4413d0)
* Ajax: Execute JSONP error script responsesDallas Fraser2020-08-252-2/+17
| | | | | | | | | | | | | | | Issue gh-4379 was meant to be a bug fix but the JSONP case is a bit special: under the hood it's a script but it simulates JSON responses in an environment without a CORS setup and sending JSON payloads on error responses is quite typical there. This commit makes JSONP error responses still execute the payload. The regular script error responses continue to be skipped. Fixes gh-4771 Closes gh-4773 (cherry picked from commit a1e619b03a557b47c3e26a5e74af12b63a0d5e73)
* Tests: Remove an unused local variableWonhyoung Park2020-08-131-2/+1
| | | | | | Closes gh-4769 (cherry picked from commit 82b87f6f0e45ca4e717b4e3a4a20a592709a099f)
* Core: Bring back QtWebKit support for jQuery 3.xNatalia Sroka2020-07-271-1/+5
| | | | | | | Allow jQuery to recognize that DOM types such as HTMLCollection or NodeList are not functions. Fixes gh-4756 Closes gh-4757
* Revert "Offset: Send px-ed strings to .css()"Michał Gołębiowski-Owczarek2020-07-201-6/+0
| | | | | | | | | | | | The way warning against number values in `.css()` setters was done in jquery/jquery-migrate#337 and later refined in jquery/jquery-migrate#348 there's no need to send px-ed strings for `top` & `left` as they already don't get the "px" suffix. This reverts commit 57038faebc6ece5bd666c28303f8a91ff59153eb. Closes gh-4753 Ref jquery/jquery-migrate/pull/337 Ref jquery/jquery-migrate/pull/348
* Build: Fix commitplease husky configBeatriz Rezener2020-07-201-1/+1
| | | | | | | Fixes gh-4735 Closes gh-4737 (cherry picked from commit 3a1b338a7a579a45543b031a003abdce4dc6ac67)
* Build: Update eslint-config-jquery, fix linting violationsMichał Gołębiowski-Owczarek2020-05-183-3/+3
| | | | | | | | Closes gh-4696 Ref jquery/eslint-config-jquery#15 Ref jquery/eslint-config-jquery#16 (cherry picked from commit ef4d6ca6c3a1b276fedc27b1f3a18823276f01a3)
* Tests: Remove remaining obsolete jQuery.cache referencesMichał Gołębiowski-Owczarek2020-05-182-36/+5
| | | | | | | | | PR gh-4586 removed some of those but not all. Closes gh-4715 Ref gh-4586 (cherry picked from commit d96111e18b42ae1bc7def72a8a0d156ea39e4d0e)
* Tests: Remove obsolete jQuery data testsMichał Gołębiowski-Owczarek2020-05-184-115/+0
| | | | | | | | The tests relied on `jQuery.cache` so they only ever worked in jQuery 1.x. Closes gh-4586 (cherry picked from commit eb35be528fdea40faab4d89ac859d38dfd024271)
* Docs: Change JS Foundation mentions to OpenJS FoundationMichał Gołębiowski-Owczarek2020-05-185-6/+6
| | | | | | Closes gh-4711 (cherry picked from 11611967adf2bd9ff4304132f917629ec1134049)
* Build: Correct code indentations based on jQuery Style GuideWonseop Kim2020-05-0516-44/+70
| | | | | | | | | | | 1. Correct code indentations based on jQuery Style Guide (contribute.jquery.org/style-guide/js/#spacing). 2. Add rules to "src/.eslintrc.json" to enable "enforcing consistent indentation", with minimal changes to the current code. Closes gh-4672 (cherry picked from 3d62d5704989f17d3a20ae7521d52e9c8c60b4ee)
* Build: Updating the 3.x-stable version to 3.5.2-pre.Timmy Willison2020-05-041-1/+1
|
* Release: update AUTHORS.txtTimmy Willison2020-05-041-2/+2
|
* Tests: Workaround failures in recent XSS tests in iOS 8 - 12Michał Gołębiowski-Owczarek2020-04-301-7/+15
| | | | | | | | | | iOS 8-12 parses `<noembed>` tags differently, executing this code. This is no different to native behavior on that OS, though, so just accept it. Ref gh-4685 Closes gh-4694 (cherry picked from commit 11066a9e6ac183dd710d1bc7aa74a3f809757136)
* Docs: Fix typosPierre Grimaud2020-04-292-3/+3
| | | | | | Closes gh-4686 (cherry picked from commit 1a7332ce83cdee7d6cd9d45c2a4b83067f53f14b)
* Tests: Add tests for recently fixed manipulation XSS issuesMichał Gołębiowski-Owczarek2020-04-291-0/+49
| | | | | | | | Closes gh-4685 Ref gh-4642 Ref gh-4647 (cherry picked from commit dc06d68bdc4c2562b5cc530f21e668a17d78ee2d)
* Tests: Cleanup `window` & `document` handlers in a new event testMichał Gołębiowski-Owczarek2020-04-271-6/+9
| | | | | | | The "focusin on document & window" test didn't cleanup `focusout` handlers on `window` & `document`. This has been fixed. Ref gh-4657
* Tests: Fix flakiness in the "jQuery.ajax() - JSONP - Same Domain" testMichał Gołębiowski-Owczarek2020-04-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "jQuery.ajax() - JSONP - Same Domain" test is firing a request with a duplicate "callback" parameter, something like (simplified): ``` mock.php?action=jsonp&callback=jQuery_1&callback=jQuery_2 ``` There was a difference in how the PHP & Node.js implementations of the jsonp action in the mock server handled situations like that. The PHP implementation was using the latest parameter while the Node.js one was turning it into an array but the code didn't handle this situation. Because of how JavaScript stringifies arrays, while the PHP implementation injected the following code: ```js jQuery_2(payload) ``` the Node.js one was injecting the following one: ```js jQuery_1,jQuery_2(payload) ``` This is a comma expression in JavaScript; it so turned out that in the majority of cases both callbacks were identical so it was more like: ```js jQuery_1,jQuery_1(payload) ``` which evaluates to `jQuery_1(payload)` when `jQuery_1` is defined, making the test go as expected. In many cases, though, especially on Travis, the callbacks were different, triggering an `Uncaught ReferenceError` error & requiring frequent manual re-runs of Travis builds. This commit fixes the logic in the mock Node.js server, adding special handling for arrays. Closes gh-4687 (cherry picked from commit 7b0864d0539bbfbb01d88d9bc95369580ffd99bc)
* Docs: Update the link to the jsdom repositoryMichał Gołębiowski-Owczarek2020-04-251-1/+1
| | | | | | Closes gh-4684 (cherry picked from commit a62309e01b3c76d2b73560ca666c454b7bbfcb77)
* Build: Test on Node.js 14, stop testing on Node.js 8 & 13Michał Gołębiowski-Owczarek2020-04-231-2/+1
| | | | | | Closes gh-4678 (cherry picked from commit 88eb22e0599d546f98f6145c53deb086e1d82857)
* Build: Enable reportUnusedDisableDirectives in ESLintEd S2020-04-202-0/+4
| | | | | | | | | This forbids unnecessary `eslint-disable` comments. Ref gh-4095 Closes gh-4520 (cherry picked from 46f9810b73a7ad446d7c3711faf92f56b67df3c1)
* Data: Make the data object a regular object againMichał Gołębiowski-Owczarek2020-04-202-10/+13
| | | | | | | | | | | | | The change in gh-4603 made the object returned by `elem.data()` a prototype-less object. That's a desired change to support keys colliding with `Object.prototype` properties but it's also a breaking change so it has to wait for jQuery 4.0.0. A 3.x-only test was added to avoid breaking it in the future on this branch. Fixes gh-4665 Ref gh-4603 Closes gh-4666
* Docs: Use https for hyperlinks in READMEJonathan2020-04-171-4/+4
| | | | | | Closes gh-4673 (cherry picked from commit 73415da25d964ee31ec1804d55f5af0199a1378e)
* Build: Updating the 3.x-stable version to 3.5.1-pre.Michał Gołębiowski-Owczarek2020-04-101-1/+1
|
* Release: Update AUTHORS.txtMichał Gołębiowski-Owczarek2020-04-101-0/+2
|
* Ajax: Do not execute scripts for unsuccessful HTTP responsesSean Robinson2020-04-064-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). (cherry picked from 50871a5a85cc802421b40cc67e2830601968affe) Fixes gh-4250 Fixes gh-4655 Closes gh-4379
* Ajax: Overwrite s.contentType with content-type header value, if anyChristian Wenz2020-04-062-0/+55
| | | | | | | | | | | | | | This fixes the issue of "%20" in POST data being replaced with "+" even for requests with content-type different from "application/x-www-form-urlencoded", e.g. for "application/json". Fixes gh-4119 Closes gh-4650 (cherry picked from 7fb90a6beaeffe16699800f73746748f6a5cc2de) Co-authored-by: Richard Gibson <richard.gibson@gmail.com> Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
* Tests: Blacklist one focusin test in IEMichał Gołębiowski-Owczarek2020-04-061-1/+8
| | | | | | | The main part of the test was checking that focusin handling in an iframe works and that's still checked. The test was also checking that it doesn't propagate to the parent document, though, and, apparently, in IE it does. This one test is now blacklisted in IE.
* Event: Use only one focusin/out handler per matching window & documentMichał Gołębiowski-Owczarek2020-04-062-10/+48
| | | | | | | | | | | | | | | The `doc` variable in: https://github.com/jquery/jquery/blob/3.4.1/src/event/focusin.js#L30 matched `document` for `document` & `window` for `window`, creating two separate wrapper event handlers & calling handlers twice if at least one `focusout` or `focusin` handler was attached on *both* `window` & `document`, or on `window` & another regular node. Also, fix the "focusin from an iframe" test to actually verify the behavior from commit 1cecf64e5aa415367a7dae0b55c2dd17b591442d - the commit that introduced the regression - to make sure we don't regress on either front. Fixes gh-4652 Closes gh-4656
* Manipulation: Skip the select wrapper for <option> outside of IE 9Michał Gołębiowski-Owczarek2020-03-303-7/+27
| | | Closes gh-4647
* Manipulation: Make jQuery.htmlPrefilter an identity functionMichał Gołębiowski-Owczarek2020-03-1618-257/+246
| | | | | | Closes gh-4642 (cherry picked from 90fed4b453a5becdb7f173d9e3c1492390a1441f)
* Selector: Update Sizzle from 2.3.4 to 2.3.5Michał Gołębiowski-Owczarek2020-03-164-324/+520
| | | | | | | Fixes gh-4424 Fixes gh-4435 Fixes gh-4441 Fixes gh-4453 Closes gh-4641
* Build: Resolve Travis config warningsMichał Gołębiowski-Owczarek2020-03-131-2/+2
| | | | | | | | | | | | | Travis reports warnings in our config: * root: deprecated key sudo (The key `sudo` has no effect anymore.) * root: missing os, using the default linux * root: key matrix is an alias for jobs, using jobs They are all now resolved. Closes gh-4636 (cherry picked from commit 5b94a4f847fe2328b1b8f2340b11b6031f95d2d1)
* Data:Event:Manipulation: Prevent collisions with Object.prototypeMichał Gołębiowski-Owczarek2020-03-026-9/+69
| | | | | | | | | | Make sure events & data keys matching Object.prototype properties work. A separate fix for such events on cloned elements was added as well. Fixes gh-3256 Closes gh-4603 (cherry picked from commit 9d76c0b163675505d1a901e5fe5249a2c55609bc)
* Release: Use an in-repository dist README fixtureMichał Gołębiowski-Owczarek2020-03-023-65/+134
| | | | | | | | | | | | | Use a dist README fixture kept in the jQuery repository instead of modifying an existing one. This makes the jQuery repository the single source of truth when it comes to jQuery releases and it makes it easier to make changes to README without worrying how it will affect older jQuery lines. The commit also ES6ifies build/release.js & build/release/dist.js Closes gh-4614 (cherry picked from commit 358b769a00c3a09a8ec621b8dcb2d5e31b7da69a)
* Build: Enable ESLint one-var rule for var declarations in browser codeMichał Gołębiowski-Owczarek2020-03-025-5/+9
| | | | | | | | | | Node.js code is written more & more commonly in ES6+ so it doesn't make sense to enable it there. There are many violations in test code so it's disabled there as well. Closes gh-4615 (cherry picked from commit 4a7fc8544e2020c75047456d11979e4e3a517fdf)
* Tests: Pass a number of necessary done() calls to assert.async()Michał Gołębiowski-Owczarek2020-03-022-10/+10
| | | | | | | | | It is no longer needed to create `done` wrappers in tests that require multiple async operations to complete. Closes gh-4633 (cherry picked from commit 364476c3dc1231603ba61fc08068fa89fb095e1a)
* Build: Test the no-Sizzle build on TravisMichał Gołębiowski-Owczarek2020-03-022-1/+9
| | | Closes gh-4635
* Build: Update .mailmap & AUTHORS.txtMichał Gołębiowski-Owczarek2020-02-242-0/+14
| | | | | | | Partially based on gh-4613. Ref gh-4613 Ref 721744a9fab5b597febea64e466272eabfdb9463
* Core:Ajax: Align nonce & global with master, fix an AMD issueMichał Gołębiowski-Owczarek2020-02-244-5/+6
| | | | | | | | | | | | | | | | This commit aligns the `3.x-stable` branch with `master` in two aspects: 1. It migrates the nonce module to return an object instead of a primitive variable. This had to be changed on `master` as in ES modules you export live read-only bindings to variables, meaning you can't increment the nonce directly. Also, the way it was done so far was working differently in AMD & the single built file - in the built file one nonce variable was declared, accessed and incremented. In AMD mode separate instances were create for each module that depend on the nonce module, creating unintended nonce clashes. 2. Whether the `noGlobal` parameter was set to `true` is now checked using the typeof operator to align with `master`. Closes gh-4612 Ref gh-4541 Ref d0ce00cdfa680f1f0c38460bc51ea14079ae8b07
* Core: Fire iframe script in its context, add doc param in globalEvalMichał Gołębiowski-Owczarek2020-02-108-10/+74
| | | | | | | | | | | | | 1. Support passing custom document to jQuery.globalEval; the script will be invoked in the context of this document. 2. Fire external scripts appended to iframe contents in that iframe context; this was already supported & tested for inline scripts but not for external ones. Fixes gh-4518 Closes gh-4601 (cherry picked from commit 4592595b478be979141ce35c693dbc6b65647173)
* Build:Tests: Fix custom build tests, verify on Travis; name Travis jobsMichał Gołębiowski-Owczarek2020-01-2728-180/+284
| | | | | | | | | | | | | | | | This commit fixes unit tests for the following builds: 1. The no-deprecated build: `custom:-deprecated` 2. The current slim build: `custom:-ajax,-effects` 3. The 4.0 (#4553) slim build: `custom:-ajax,-callbacks,-deferred,-effects` It also adds separate Travis jobs for the no-deprecated & slim builds. Apart from that, add intuitive names to Travis jobs. Otherwise it's hard to see at a glance that a particular job is running on Firefox ESR, for example. Ref gh-4577 Ref gh-4596 Closes gh-4600
* Ajax: Deprecate AJAX event aliases, inline event/alias into deprecatedMichał Gołębiowski-Owczarek2020-01-217-58/+56
| | | | | | | | | | | A new `src/deprecated` directory makes it possible to exclude some deprecated APIs from a custom build when their respective "parent" module is excluded without keeping that module outside of the `src/deprecated` directory or the `src/deprecated.js` file. Closes gh-4572 (cherry picked from 23d53928f383b0e7440bf4b08b7524e6af232fad)
* Build: Lint the minified jQuery file as wellMichał Gołębiowski-Owczarek2020-01-214-19/+30
| | | | | | | | | | | | While we have absolutely no style-related expectations to our minified file, we do care that it's valid ES 5.1. This is now verified. Also, update grunt-eslint as a newer ESLint version is required to be able to use "extends" inside of the "overrides" section. Fixes gh-3075 Closes gh-4594 Ref gh-4598
* Build: Make Karma work in AMD modeMichał Gołębiowski-Owczarek2020-01-219-125/+183
| | | | | | | | | | | Also, run such a suite in CI to make sure modules are working as expected when used directly. (partially cherry picked from 341c6d1b5abe4829f59fbc32e93f6a6a1afb900f) (partially cherry picked from 437f389a24a6bef213d4df507909e7e69062300b) Closes gh-4595 Ref gh-4550 Ref gh-4574
* Docs: Update links to EdgeHTML issues to go through Web ArchiveMichał Gołębiowski-Owczarek2020-01-081-22/+22
| | | | | | | | | | | | With Microsoft going Chromium with Edge, its old EdgeHTML issues were all removed. :( The commit also reformats one manipulation unit test to use tabs instead of spaces for indentation. (partially cherry-picked from 1dad1185e0b2ca2a13bf411558eda75fb2d4da88) Closes gh-4584
* Tests: Make the support tests pass on Firefox 4x/5x/60Michał Gołębiowski-Owczarek2020-01-071-1/+1
| | | | | | | The check for old Firefox versions with different support test result only checked for Firefox 52 or 60. It now checks for 4x/5x/60 to understand more versions. Closes gh-4583
* Build: Create a `grunt custom:slim` alias for the Slim buildMichał Gołębiowski-Owczarek2020-01-073-2/+25
| | | | | | Closes gh-4578 (cherry-picked from 9b9ed469b43e9fa6e2c752444470ae4c87d03d57)
* Event: Only attach events to objects that accept data - for realMichał Gołębiowski-Owczarek2019-12-092-3/+13
| | | | | | | | | | | | | There was a check in jQuery.event.add that was supposed to make it a noop for objects that don't accept data like text or comment nodes. The problem was the check was incorrect: it assumed `dataPriv.get( elem )` returns a falsy value for an `elem` that doesn't accept data but that's not the case - we get an empty object then. The check was changed to use `acceptData` directly. (cherry picked from d5c505e35d8c74ce8e9d99731a1a7eab0e0d911c) Fixes gh-4397 Closes gh-4558
* Tests: Skip a "width/height on a table row with phantom borders" test in FirefoxMichał Gołębiowski-Owczarek2019-10-281-1/+8
| | | | | | | | | Firefox 70 & newer fail this test but the issue there is more profound - Firefox doesn't subtract borders from table row computed widths. Closes gh-4537 Ref jquery/jquery#4529 Ref https://bugzilla.mozilla.org/show_bug.cgi?id=1590837 Ref w3c/csswg-drafts#4444