aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Build: ESLint: forbid unused function parametersMichał Gołębiowski-Owczarek2019-09-2617-26/+25
| | | | | | | | | | | | | | | | 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 (cherry-picked from 438b1a3e8a52d3e4efd8aba45498477038849c97)
* Build: Fix the regex parsing AMD var-modules (#4389)Michał Gołębiowski-Owczarek2019-09-261-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 (cherry picked from commit 9ec09c3b4aa5182c2a8b8f51afb861b685a4003c)
* Effect: Fix a unnecessary conditional statement in .stop()Wonseop Kim2019-09-261-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 (cherry picked from commit 110802c7f22b677ef658963aa95ebdf5cb9c5573)
* Core: Deprecate jQuery.trimShashanka Nataraj2019-09-265-36/+33
| | | | | | | Fixes gh-4363 Closes gh-4461 (cherry picked from 5ea5946094784f68437ef26d463dfcfbbbaff1f6)
* Core: Use Array.prototype.flat where supportedAhmed.S.ElAfifi2019-09-255-15/+41
| | | | | | | | | | | | | 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. (cherry picked from 9df4f1de12728b44a4b0f91748f12421008d9079) Fixes gh-4320 Closes gh-4459
* Build: Update the version to 3.5.0-preMichał Gołębiowski-Owczarek2019-09-251-1/+1
|
* 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 (cherry picked from commit 78420d427cf3734d9264405fcbe08b76be182a95)
* Tests: Fix offset fractions tests in Chrome for AndroidMichał Gołębiowski-Owczarek2019-09-241-1/+1
| | | | | | This commit backports a looser assertion from `master` where the browsers passes offset tests. Closes gh-4470
* Tests: Move Android user agent detection above iOS, put Safari lastMichał Gołębiowski-Owczarek2019-09-241-4/+4
| | | | | | Android was catching the generic iOS regex. Checking for Android first should eliminate that issue as iOS user agents don't contain the word "Android". Putting Safari last makes Android UAs not be tested against it.
* Tests: Make support tests accept Safari 13 & newerMichał Gołębiowski-Owczarek2019-09-231-5/+5
| | | | | | | | The regexes detecting browsers with their versions have been updated for iOS and Safari so that all iOS >=11 & all Safari (desktop) >= 11 are recognized. This is required to make Safari 13 & iOS 13 pass support tests but it'll also make tests forward-compatible with future Safari/iOS versions. Closes gh-4488
* Tests: update npo.js and include unminified source insteadTimmy Willison2019-08-122-2/+370
| | | | | Close gh-4446 Ref gh-4445
* Selector: Make selector-native's isXMLDoc recognize HTML-embedded SVGMichał Gołębiowski-Owczarek2019-07-292-13/+55
| | | | | | | | | | This commit also backports some jQuery.isXMLDoc tests from master so that this behavior doesn't regress. (partially cherry-picked from 79b74e043a4ee737d44a95094ff1184e40bd5b16) Closes gh-4438 Ref jquery/sizzle#378 Ref jquery/sizzle#436
* 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. (cherry-picked from ccbd6b93424cbdbf86f07a86c2e55cbab497d7a3) Closes gh-4390 Ref gh-4384 Ref gh-4385
* Traversing: Fix `contents()` on `<object>`s with childrenPat O'Callaghan2019-05-062-1/+14
| | | | | | | (cherry-picked from 4d865d96aa5aae91823c50020b5c19da79566811) Fixes gh-4384 Closes gh-4385
* Build: Updating the 3.4-stable version to 3.4.2-pre.Timmy Willison2019-05-011-1/+1
|
* Core: Make isAttached work with iOS 10.0-10.2Michał Gołębiowski-Owczarek2019-04-293-5/+20
| | | | | | | | | | | The test for Shadow DOM v1 support has been changed to rely on the presence of `documentElement.getRootNode` as iOS 10.0-10.2 supports `attachShadow` but doesn't support `getRootNode`. No new test is necessary - iOS 10.0 fails lots of our test suite because of this bug. Fixes gh-4356 Closes gh-4360
* Event: Prevent leverageNative from registering duplicate dummy handlersRichard Gibson2019-04-291-5/+5
| | | Closes gh-4353
* Event: Fix handling of multiple async focus eventsRichard Gibson2019-04-292-12/+61
| | | | 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
| | | | | | (cherry-picked from b8d4712825a26a7f24c2bdb5a71aa3abcd345dfd) Closes gh-4369
* Build: Fix unresolved jQuery reference in finalPropNameMichał Gołębiowski-Owczarek2019-04-172-4/+12
| | | | | | | | | | Also, prevent further similar breakages by changing our ESLint configuration to disallow relying on a global jQuery object in AMD modules. (cherry-picked from 874030583c9b94603de467124420e6c7a1c3c8ac) Fixes gh-4358 Closes gh-4361
* Build: Updating the 3.4-stable version to 3.4.1-preTimmy Willison2019-04-101-1/+1
|
* Release: update AUTHORS.txtTimmy Willison2019-04-091-0/+8
|
* Release: update version to 3.4.0-preTimmy Willison2019-04-091-1/+1
|
* Build: Update Sizzle from 2.3.3 to 2.3.4Michał Gołębiowski-Owczarek2019-04-095-46/+56
| | | | | | | | | (cherry-picked from 0b2c36adb4e2c048318659e4196e0925da10ead2) Fixes gh-1756 Fixes gh-4170 Fixes gh-4249 Closes gh-4345
* Update README.mdTimmy Willison2019-04-021-1/+1
|
* Tests: Make Android Browser 4.0-4.3 dimensions tests greenMichał Gołębiowski-Owczarek2019-03-271-2/+16
| | | | | | | | | | Android Browser disregards td's box-sizing, treating it like it was content-box. Unlike in IE, offsetHeight shares the same issue so there's no easy way to workaround the issue without incurring high size penalty. Let's at least check we get the size as the browser sees it. Also, fix the nearby support comment syntax. Closes gh-4335
* Tests: Make Android Browser 4.0-4.3 AJAX tests greenMichał Gołębiowski-Owczarek2019-03-271-1/+9
| | | | | | | Android Browser versions provided by BrowserStack fail the "prototype collision (constructor)" test while locally fired emulators don't, even when they connect to TestSwarm. Just skip the test there to avoid a red build. Closes gh-4334
* Core: Preserve CSP nonce on scripts with src attribute in DOM manipulationbuddh42019-03-255-3/+46
| | | | | Fixes gh-4323 Closes gh-4328
* Event: Prevent leverageNative from double-firing focusinRichard Gibson2019-03-252-93/+85
| | | | | | Also, reduce size. Closes gh-4329 Ref gh-4279
* Core: Prevent Object.prototype pollution for $.extend( true, ... )Michał Gołębiowski-Owczarek2019-03-252-1/+9
| | | Closes gh-4333
* Event: Leverage native events for focus/blur/click; propagate additional dataRichard Gibson2019-03-205-54/+294
| | | | | | | | | | | | | | | | | | | | | Summary of the changes/fixes: 1. Trigger checkbox and radio click events identically (cherry-picked from b442abacbb8464f0165059e8da734e3143d0721f that was reverted before). 2. Manually trigger a native event before checkbox/radio handlers. 3. Add test coverage for triggering namespaced native-backed events. 4. Propagate extra parameters passed when triggering the click event to the handlers. 5. Intercept and preserve namespaced native-backed events. 6. Leverage native events for focus and blur. 7. Accept that focusin handlers may fire more than once for now. Fixes gh-1741 Fixes gh-3423 Fixes gh-3751 Fixes gh-4139 Closes gh-4279 Ref gh-1367 Ref gh-3494
* CSS: Avoid forcing a reflow in width/height getters unless necessaryMichał Gołębiowski-Owczarek2019-03-182-11/+20
| | | | | | | | Fixes gh-4322 Closes gh-4325 Ref gh-3991 Ref gh-4010 Ref gh-4185 Ref gh-4187
* Build: Run the basic test suite in jsdomMichał Gołębiowski-Owczarek2019-03-115-4/+98
| | | | | | The basic test suite is now run in jsdom on all supported Node.js versions (8, 10 & 11 as of now). Closes gh-4310
* Build: Remove manual QUnit fixture resettingMichał Gołębiowski-Owczarek2019-03-112-5/+1
| | | | | | It was needed when QUnit 1.x one used but we've since upgraded to QUnit 2.x. Closes gh-4312 Ref gh-4307
* Build: Make Promises/A+ tests use the dot reporter instead of the defaultMichał Gołębiowski-Owczarek2019-03-111-5/+6
| | | | | | The default reporter is very verbose as it prints all the test names it encounters. We already use the dot reporter for Karma tests. Closes gh-4313
* Build: Update QUnit from 1.23.1 to 2.9.2Michał Gołębiowski-Owczarek2019-03-0415-4520/+6768
| | | Closes gh-4307
* Build: Run Karma browser tests on Node.js 10 instead of 8Michał Gołębiowski-Owczarek2019-03-041-1/+1
| | | | | | | | Node.js 10 has been in Active LTS since 2018-04-24 and Node.js 8 is now in maintenance mode. See https://github.com/nodejs/Release for more details. Closes gh-4311
* Build: Update jsdom; migrate a test with Symbol polyfill to an iframe testMichał Gołębiowski-Owczarek2019-03-0419-131/+162
| | | | | | | | | | | So far, we've been testing that jQuery element iteration works with polyfilled Symbol & transpiled for-of via a Node test with jsdom with the Symbol global removed. Unfortunately, jsdom now requires Symbol to be present for its internal functionality so such a test is no longer possible. Instead, it's been migrated to an iframe test with transpiled JavaScript. This PR also enables us to use ECMAScript 2017 or newer in Node.js code. Closes gh-4305
* Build: Remove obsolete globals from ESLint configurationMichał Gołębiowski-Owczarek2019-02-193-11/+6
| | | | | We had quite a few obsolete globals declared in various ESLint config files. We also no longer allow to rely on the `noGlobal` & `jQuery` globals in the built file which is not needed. Closes gh-4301
* Build: Update most dependenciesabnud12019-02-193-20/+24
| | | | | | | | | | | | | | | | The only packages not fully updated are: - qunitjs & karma-qunit as that's a QUnit 2.x update that will require some changes and we'll do that later - jsdom as we need to first rewrite the test with the Symbol polyfill - newer jsdom versions don't work with such a hacked Symbol instance - sinon as the v2 -> v7 upgrade requires to update our unit tests - uglify-js & grunt-contrib-uglify as latest uglify-js versions slightly worsen the minified gzipped size Closes gh-4227 Closes gh-4228 Closes gh-4230 Closes gh-4232
* Build: Update test code for compatibility with QUnit 2.x (#4297)abnud12019-02-1838-5435/+10979
| | | | | | | | Also, run `grunt npmcopy` to sync the "external" directory with dependencies from package.json. For example, the Sinon library version didn't match. Ref gh-4234 Closes gh-4297
* Build: Advise to create test cases on JS Bin or CodePen, drop JSFiddleMichał Gołębiowski-Owczarek2019-01-291-1/+1
| | | | | | | | | | JSFiddle doesn't support IE (even 11) anymore so we shouldn't advise users to use it to create test cases. To make people have a choice, add CodePen to the list. Also, link to specific starter templates so that novices don't need to spend time thinking how to set up the basic structure. Closes gh-4289
* Core: Support passing nonce through jQuery.globalEvalMichał Gołębiowski-Owczarek2019-01-218-17/+64
| | | | | | Fixes gh-4278 Closes gh-4280 Ref gh-3541 Ref gh-4269
* Manipulation: Respect script nomodule attribute in DOM manipulationMichał Gołębiowski-Owczarek2019-01-214-2/+34
| | | | | | | | | | | | | PR #3869 added support for `<script type="module">` & some support for the `nomodule` attribute but with no tests for `nomodule` and with the attribute only respected on inline scripts. This commit adds support for source-based scripts as well. It also adds tests for `nomodule`, including making sure legacy browsers execute such scripts as they'd natively do - that's the whole point of `nomodule` scripts, after all. Fixes gh-4281 Closes gh-4282 Ref gh-3871 Ref gh-3869
* Tests: Skip nonce tests in old iOS/Android as wellMichał Gołębiowski-Owczarek2019-01-141-2/+5
| | | | | | | | | | Old iOS & Android Browser versions support script-src but not nonce, making the nonce test impossible to run. Browsers not supporting CSP at all are not a problem as they'll skip script-src restrictions completely. Ref gh-3541 Ref gh-4269 Ref c7c2855ed13f23322c4064407c1ed84561b95738
* Core: Preserve CSP nonce on scripts in DOM manipulationMichał Gołębiowski-Owczarek2019-01-147-1/+68
| | | | Fixes gh-3541 Closes gh-4269
* Tests: Exclude Android 4.x from repeated header names testMichał Gołębiowski-Owczarek2018-12-141-1/+11
| | | | | | | | Android Browser only returns the last value for each header so there's no way for jQuery get all parts. Closes gh-4259 Ref gh-3403 Ref gh-4173
* Manipulation: Restore _evalUrl jQuery.ajax calls to dataType: scriptRichard Gibson2018-12-131-4/+8
| | | | | | IE and iOS <10 XHR transport does not succeed on data: URIs Ref gh-4243 Ref gh-4126 Closes gh-4258
* Manipulation: Only evaluate HTTP-successful script srcRichard Gibson2018-12-122-2/+24
| | | | | Fixes gh-4126 Closes gh-4243
* Core: Tiny efficiency fix to jQuery.extend / jQuery.fn.extend (#4246)Marja Hölttä2018-12-121-6/+8
| | | | | | | | | Read target[name] only when it's needed. In addition to doing the property read-only when needed, this avoids a slow path in V8 (see the issue for more details). Fixes gh-4245 Closes gh-4246