aboutsummaryrefslogtreecommitdiffstats
path: root/src/var
Commit message (Collapse)AuthorAgeFilesLines
* CSS:Selector: Align with 3.x, remove the outer `selector.js` wrapperMichał Gołębiowski-Owczarek2023-09-201-1/+1
| | | | | | | | | | | | | | | | Bring some changes from `3.x-stable`: * rename `rtrim` to `rtrimCSS` to distinguish from the previous `rtrim` regex used for `jQuery.trim` * backport one `id` selector test that avoids the selector engine path Other changes: * remove the inner function wrapper from `selector.js` by renaming the imported `document.js` value * use `jQuery.error` in `selectorError` * make Selector tests pass in all-modules runs by fixing a sinon mistake in Core tests - Core tests had a spy set up for `jQuery.error` that wasn't cleaned up, influencing Selector tests when all were run together Closes gh-5295
* Core: Use named exports in `src/`Michał Gołębiowski-Owczarek2023-09-1225-40/+40
| | | | | | | | | The `default` export is treated differently across tooling when transpiled to CommonJS - tools differ on whether `module.exports` represents the full module object or just its default export. Switch `src/` modules to named exports for tooling consistency. Fixes gh-5262 Closes gh-5292
* Core: Don't rely on splice being present on inputBruno PIERRE2022-01-241-0/+3
| | | | | | | | | | Without this fix calling `jQuery.uniqueSort` on an array-like can result in: TypeError: results.splice is not a function at Function.jQuery.uniqueSort (https://code.jquery.com/jquery-git.js:664:12) at jQuery.fn.init.find (https://code.jquery.com/jquery-git.js:2394:27) at gocusihafe.js:3:4 Closes gh-4986
* CSS: Trim whitespace surrounding CSS Custom Properties valuesfecore12021-09-232-0/+8
| | | | | | | | The spec has recently changed and CSS Custom Properties values are trimmed now. This change makes jQuery polyfill that new behavior for all browsers. Ref w3c/csswg-drafts#774 Fixes gh-4926 Closes gh-4930
* Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge)Michał Gołębiowski-Owczarek2020-09-221-2/+2
| | | | | | | | | | | | Drop support for Edge Legacy: the non-Chromium, EdgeHTML-based Microsoft Edge version. Also, restrict some workarounds that were applied unconditionally in all browsers to run only in IE now. This slightly increases the size but reduces the performance burden on modern browsers that don't need the workarounds. Also, clean up some comments & remove some obsolete workarounds. Fixes gh-4568 Closes gh-4792
* Deprecated: Remove jQuery.trimMichał Gołębiowski-Owczarek2020-05-181-1/+0
| | | | | | The API has been deprecated in 3.5.0 so it can be removed in 4.0.0. Ref gh-4461 Closes gh-4695
* Build: Update eslint-config-jquery, fix linting violationsMichał Gołębiowski-Owczarek2020-05-181-1/+1
| | | | | Closes gh-4696 Ref jquery/eslint-config-jquery#15 Ref jquery/eslint-config-jquery#16
* Core: Migrate from AMD to ES modules 🎉Michał Gołębiowski-Owczarek2019-11-1823-140/+43
| | | | | | | | | | | | | | | | | | | | | | 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
* Core: Use Array.prototype.flat where supportedAhmed.S.ElAfifi2019-09-252-7/+15
| | | | | | | | | | | 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
* Core: Remove private copies of push, sort & splice from the jQuery prototypeMichał Gołębiowski-Owczarek2019-09-241-0/+7
| | | Closes gh-4473
* Selector: Inline Sizzle into the selector moduleMichał Gołębiowski-Owczarek2019-07-291-0/+7
| | | | | | | | | | | | | | | | | | 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
* Core: Remove IE-specific support tests, rely on document.documentModeMichał Gołębiowski-Owczarek2019-05-131-0/+7
| | | | | | | Also, update some tests to IE-sniff when deciding whether to skip a test. Fixes gh-4386 Closes gh-4387
* Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJSMichał Gołębiowski-Owczarek2019-04-292-13/+5
| | | | | | | | | | | 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
* Event: Leverage native events for focus/blur/click; propagate additional dataRichard Gibson2019-03-201-0/+5
| | | | | | | | | | | | | | | | | | | | | 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
* Core: Recognize Shadow DOM in attachment checksSaptak Sengupta2018-11-091-11/+0
| | | | | | | Allow `isAttached` to check Shadow DOM for attachment. Fixes gh-3504 Closes gh-3996 Ref gh-3977
* Core: Use isAttached to check for attachment of elementSaptak Sengupta2018-03-051-0/+11
| | | | | | | This change replaces the use of contains to check for attachment by isAttached function Closes gh-3977 Ref gh-3504
* Tests: fix tests in AMD modeTimmy Willison2018-01-161-6/+6
|
* Core: deprecate jQuery.isFunctionJason Bedard2018-01-151-0/+13
| | | | Fixes gh-3609
* Core: Deprecate jQuery.isWindowShashanka Nataraj2017-07-101-0/+8
| | | | | Fixes gh-3629 Close gh-3702
* Docs: Update links to HTML spec for stripAndCollapse (#3594)Boom Lee2017-03-291-1/+1
|
* Revert "Event: Trigger checkbox and radio click events identically"Timmy Willison2017-03-201-5/+0
| | | | This reverts commit b442abacbb8464f0165059e8da734e3143d0721f.
* Event: Trigger checkbox and radio click events identicallyAlex Padilla2017-01-191-0/+5
| | | | | Fixes gh-3423 Closes gh-3494
* Core: rnotwhite -> rhtmlnotwhite and jQuery.trim -> stripAndCollapseTimmy Willison2016-09-152-5/+8
| | | | | | | | | | | | - Renames and changes rnotwhite to focus on HTML whitespace chars - Change internal use of jQuery.trim to more accurate strip and collapse - Adds tests to ensure HTML space characters are retained where valid - Doesn't add tests where the difference is inconsequential and existing tests are adequate. Fixes gh-3003 Fixes gh-3072 Close gh-3316
* Build: Put all AMD modules in "src/" in strict modeMichał Gołębiowski2016-04-2517-0/+32
| | | | Fixes gh-3073
* Core: Simplify isPlainObjectRichard Gibson2016-04-043-0/+13
| | | | | Fixes gh-2986 Close gh-2998
* Build: Update jscs and lint filesOleg Gaidarenko2015-09-0714-30/+32
| | | | Fixes gh-2056
* Core: Switch from modules to just window.setTimeout etc.Michał Gołębiowski2015-06-174-12/+0
| | | | | | Using modules for window.setTimeout etc. made those functions cached and disabled Sinon mocking, making effects tests fail. Just writing window.setTimeout directly is smaller anyway.
* Core: Use window.setTimeout & friends instead of global equivalentsMichał Gołębiowski2015-06-174-0/+12
| | | | Fixes gh-2177
* CSS: Support relative adjustment in any applicable unitMr212015-03-091-0/+7
| | | | | Fixes gh-1711 Closes gh-2011
* Build: Don't assume the browser environment; smoke test on Node w/ jsdomMichał Gołębiowski2014-12-262-0/+8
| | | | | Fixes gh-1950 Closes gh-1949
* Core: Drop strundefined variableChris Antaki2014-09-021-3/+0
|
* Core: Remove native String#trim usage to save sizeMichał Gołębiowski2014-03-041-3/+0
| | | | Fixes #14794
* Separate jQuery.fn.init into its own module (for lighter core dependencies ↵Timmy Willison2013-09-091-4/+0
| | | | across all modules)
* Add AMD+CommonJS capabilities to the build script (for modules with long ↵Timmy Willison2013-09-091-0/+1
| | | | unreadable dependency lists)
* Move parsing methods to their own files (separates manipulation dependency ↵Timmy Willison2013-09-081-0/+4
| | | | from core)
* No ticket. Restore checking individual src/**/*.js files by jsHint.Michał Gołębiowski2013-09-0612-14/+14
|
* Fix #10814. Make support tests lazy and broken out to components.Michał Gołębiowski2013-09-061-0/+4
|
* AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163.Timmy Willison2013-08-1512-0/+48