summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Event: remove jQuery.event.globalMichał Gołębiowski-Owczarek2020-02-102-6/+0
| | | | | | | jQuery.event.global has been write-only in the jQuery source for the past few years; reading from it was removed in c2d6847de09a52496f78baebc04f317e11ece6d2 when fixing the trac-12989 bug. Closes gh-4602
* Docs: Remove a mention of the event/alias.js module from READMEMichał Gołębiowski-Owczarek2020-01-271-1/+1
| | | | | | | The file contents now lie in deprecated/event.js so the README reference is no longer correct. Ref gh-4572 Closes gh-4599
* Build: Lint the minified jQuery file as well - a Gruntfile fixMichał Gołębiowski-Owczarek2020-01-271-1/+1
| | | | | | | | 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. Fixes gh-3075 Ref gh-4594 Closes gh-4598
* Ajax: Deprecate AJAX event aliases, inline event/alias into deprecatedMichał Gołębiowski-Owczarek2020-01-217-52/+50
| | | | | | | | 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
* CSS: Remove the opacity CSS hookMichał Gołębiowski-Owczarek2020-01-211-12/+1
| | | | | | | | The consequence is `.css( "opacity" )` will now return an empty string for detached elements in standard-compliant browsers and "1" in IE & the legacy Edge. That behavior is shared by most other CSS properties which we're not normalizing either. Closes gh-4593
* Build: Lint the minified jQuery file as wellMichał Gołębiowski-Owczarek2020-01-212-8/+14
| | | | | | | 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. Fixes gh-3075 Closes gh-4594
* Build: Add intuitive names to Travis jobsMichał Gołębiowski-Owczarek2020-01-201-12/+12
| | | | | | Otherwise it's hard to see at a glance that a particular job is running on Firefox ESR, for example. Closes gh-4596
* Core: Exclude callbacks & deferred modules in the slim build as wellMichał Gołębiowski-Owczarek2020-01-201-1/+1
| | | | | | | | | | | So far, the slim build only excluded ajax & effects modules. As many web apps right now rely on native Promises, often with a polyfill for legacy browsers, deferred & callbacks modules are not that useful for sites that already exclude ajax & effects modules. This decreases the gzipped minified size of the slim module by 1760 bytes, to 19706 bytes (below 20k!). Closes gh-4553
* Attributes: Refactor val(): don't strip carriage return, isolate IE workaroundsMichał Gołębiowski-Owczarek2020-01-132-22/+70
| | | | | | | | | | Before this change, `val()` was stripping out carriage return characters from the returned value. No test has relied on that. The logic was different for option elements as its custom defined hook was omitting this stripping logic. This commit gets rid of the carriage return removal and isolates the IE-only select val getter to be skipped in other browsers. Closes gh-4585
* Tests: Remove obsolete jQuery data testsMichał Gołębiowski-Owczarek2020-01-134-115/+0
| | | | | The tests relied on `jQuery.cache` so they only ever worked in jQuery 1.x. Closes gh-4586
* Attributes: Don't set the type attr hook at all outside of IEMichał Gołębiowski-Owczarek2020-01-131-17/+18
| | | | | This removes a needless function call in modern browsers. Closes gh-4587
* Build: Make dev mode work in Karma again, serve source files from diskMichał Gołębiowski-Owczarek2020-01-082-15/+43
| | | | | | | | | | | | | | | | | | PR gh-4550 added support for running ES modules & AMD tests via Karma. This required reading the `esmodules` & `amd` props from both `QUnit.config` & `QUnit.urlParams`. By picking these two properties manually, the `dev` one stopped being respected while ones handled directly by QUnit were fine (like `hidepassed`). Instead of maintaining the full list of options, the code now iterates over QUnit URL config and handles the fallbacks in a more generic way. Apart from that, all jQuery source & test files are now read directly from disk instead of being cached by Karma so that one can run `grunt karma:chrome-debug` & work on a fix without restarting that Karma run after each change. A similar effect could have been achieved by setting `autoWatch` to `true` but then the main Karma page runs tests in an iframe by default when `grunt karma:chrome-debug` is run instead of relying on the current debug flow. Closes gh-4574 Ref gh-4550
* Build:Tests: Fix custom build tests, verify on Travis Michał Gołębiowski-Owczarek2020-01-0726-84/+174
| | | | | | | | | | | 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 future (#4553) slim build: `custom:-ajax,-callbacks,-deferred,-effects` It also adds separate Travis jobs for the no-deprecated & slim builds. Closes gh-4577
* Docs: Update links to EdgeHTML issues to go through Web ArchiveMichał Gołębiowski-Owczarek2020-01-071-3/+3
| | | | | | With Microsoft going Chromium with Edge, its old EdgeHTML issues were all removed. :( Closes gh-4584
* Build: Create a `grunt custom:slim` alias for the Slim build (#4578)Michał Gołębiowski-Owczarek2020-01-073-2/+25
| | | Closes gh-4578
* Selector: Remove the "a:enabled" workaround for Chrome <=77Michał Gołębiowski-Owczarek2019-12-162-14/+1
| | | | | | | 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
* Docs: direct users to GitHub docs for cloning the repoTimmy Willison2019-12-161-6/+2
| | | | Ref gh-4556 Close gh-4571
* Build: Make Karma work in ES modules modeMichał Gołębiowski-Owczarek2019-12-1610-131/+188
| | | | | | Also, run such a suite in CI to make sure modules are working as expected when used directly. Closes gh-4550
* Build: Auto-convert sources to AMDMichał Gołębiowski-Owczarek2019-12-0910-16/+91
| | | | | | | | | | | | | | | jQuery source has been migrated in gh-4541 from AMD to ES modules. To maintain support for consumers of our AMD modules, this commits adds a task transpiling the ES modules sources in `src/` to AMD in `amd/`. A "Load with AMD" checkbox was also restored to the QUnit setup. Note that, contrary to jQuery 3.x, AMD files need to be generated via `grunt amd` or `grunt` as sources are not authored in ECMAScript modules. To achieve a similar no-compile experience during jQuery 4.x testing, use the new "Load as modules" checkbox which works in all supported browsers except for IE & Edge (the legacy, EdgeHTML-based one). Ref gh-4541 Closes gh-4554
* Event: Only attach events to objects that accept data - for realMichał Gołębiowski-Owczarek2019-12-092-2/+12
| | | | | | | | | | 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. Fixes gh-4397 Closes gh-4558
* Docs: Change OS X to macOS in READMEChristian Oliff2019-12-031-1/+1
| | | | | macOS has been around for long enough to update the naming here. Closes gh-4552
* Build: Fix the Windows buildMichał Gołębiowski-Owczarek2019-12-023-18/+51
| | | | | | | This commit gets rid of rollup-plugin-hypothetical in favor of a simpler inline Rollup plugin that fits our need and is compatible with Windows. Fixes gh-4548 Closes gh-4549
* Build: Require extensions for ES6 imports, prevent import cyclesMichał Gołębiowski-Owczarek2019-11-252-0/+8
| | | | | | | | | | | | | | | | jQuery source is now authored in ECMAScript modules. Native browser support for them requires full file names including extensions. Rollup works even if import paths don't specify extensions, though, so one import slipped through without such an extension, breaking native browser import of src/jquery.js. A new ESLint rule using eslint-plugin-import prevents us from regressing on that front. Also, eslint-plugin-import's no-cycle rule is used to avoid import cycles. Closes gh-4544 Ref gh-4541 Ref 075320149ae30a5c593c06b2fb015bdf033e0acf
* Build: Fix the import path to serialize.js from ajax.jsMichał Gołębiowski-Owczarek2019-11-191-1/+1
|
* Selector: Make empty attribute selectors work in IE againMichał Gołębiowski-Owczarek2019-11-187-9/+39
| | | | | | | | | | 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-18124-1324/+801
| | | | | | | | | | | | | | | | | | | | | | 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
* 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 (cherry picked from commit c79e1d5fefc50b1df0a1c2ca3f06b567e79c0f9b)
* 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