Comments (2)
Summary of the major 4.0.0
changes
Each list is sorted by modules alphabetically, with the exception of Core
which always comes first.
Breaking changes
- Core: Move the factory to separate exports
- 46f6e3d
- This is about the Node.js behavior for windowless environments where
require( "jquery" )( window )
is required
- Core: Remove deprecated jQuery APIs
- Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS
- Core: Remove private copies of push, sort & splice from the jQuery prototype
- Core: Exclude callbacks & deferred modules in the slim build as well
- Core: Drop the
root
parameter ofjQuery.fn.init
(undocumented) - Ajax: Drop the json to jsonp auto-promotion logic
- Ajax: Avoid CSP errors in the script transport for async requests
- 07a8e4a
- Make more requests use the
<script src>
part of the script transport
- Ajax: Don't auto-execute scripts unless dataType provided
- Attributes: Drop the
toggleClass(boolean|undefined)
signature - CSS: Don't automatically add "px" to properties with a few exceptions
- CSS: Remove the opacity CSS hook
- 865469f
- 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.
- Data: Separate data & css/effects camelCase implementations
- 8fae212
- The data one no longer special-cases
ms-
- Data:Event:Manipulation: Prevent collisions with Object.prototype
- 9d76c0b
- Breaks code using
hasOwnProperty
- Deferred: Drop
jQuery.Deferred.getStackHook
(renamed since3.7.0
tojQuery.Deferred.getErrorHook
)- 258ca1e
- Used to pass the original error to
jQuery.Deferred.exceptionHook
(previously we recommended passing stack but that breaks source maps)
- Event: Stop shimming focusin & focusout events
- 8a74137
- Affects event order
- Event: Avoid collisions between
jQuery.event.special
&Object.prototype
- bcaeb00
- Affects code calling
hasOwnProperty
onjQuery.event.special
- Manipulation: Avoid concatenating strings in
buildFragment
- 9c98e4e
- Needed for Trusted Types support - the breaking aspect of it is likely minimal
- Manipulation: Don't remove CDATA sections from scripts
- Selector: Drop support for legacy pseudos
- 8c7da22
- References in Sizzle wiki: https://github.com/jquery/sizzle/wiki#-backwards-compatible-plugins-for-pseudos-with-arguments
- Selector: Backport jQuery selection context logic to selector-native
Other notable changes
- Core: Remove IE-specific support tests, rely on
document.documentMode
- Core: Migrate from AMD to ES modules 🎉
- Core: Add
exports
to package.json, export slim & esm builds - Core:Manipulation: Add basic TrustedHTML support
- Ajax: Support binary data (including FormData)
- a7ed9a7
- Possible minor breaking change: prefilters are now applied before data is converted to a string
- Deferred: Respect source maps in
jQuery.Deferred.exceptionHook
- 0b9c503
- Affects errors in Promise callbacks for which jQuery print errors as they are typically human error rather than an exception to handle in code
- Selector: reduce size, simplify
setDocument
from jquery.
Moving this to the jQuery repo for easier commit/PR/issue references.
from jquery.
Related Issues (20)
- Cannot read properties of null (reading 'compareDocumentPosition') HOT 3
- Invalid links in blog article HOT 2
- The jquery.factory.js bundle is missing in the npm package in the 4.0.0-beta release HOT 2
- `require( "jquery" )` returns a module object when used with Webpack & jQuery 4.0.0-beta HOT 24
- v4 beta : mottie/tablesorter plugin fails with sort() and trim() missing HOT 1
- Jquery-UI getting Error With jQuery jQuery 4.0.0 BETA! HOT 4
- jQuery.get() 4.0 backward compatibility issue HOT 3
- Permissions policy violation due to unload event HOT 1
- Avoiding JQuery version disclosure on Angular's Script.JS HOT 1
- Scripts in dynamically set html always asynchronously loaded HOT 3
- jQuery 3.7.1 is still making wrong calculation of dimensions in Firefox. HOT 1
- Memory Leak: OriginAnchor HOT 6
- Memory Leak: boxSizingReliable HOT 4
- Triggering after an `alert()` in an event handler results in a JS error HOT 3
- The strange behavior generated by the append method HOT 1
- Avoid counting scroll twice in offset
- jQuery Migrate 3.4.0 - elem.focus() is not working HOT 3
- Issue or behaviour??? - 2.2.3 to 3.6.0 - active element changed on focus. HOT 2
- Issue using JQuery 3.7.1 and CSP HOT 2
- Jquery Vite installation doesnt work. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery.