jQuery JavaScript Web Geliştirme Sürüm Notları Hacker News

jQuery 4.1.0 Released: New Features, Removals and Security Fixes

jQuery 4.1.0 adds a responseURL field to Ajax, serialize support for form-associated custom elements and a ReDoS fix. The getElementsByTagName and getElementsByClassName helpers were removed.

2 min read 30 views

jQuery 4.1.0 is out, and its GitHub release page collected more than 360 points on Hacker News. The release brings small but useful additions, a few removals and hardening fixes on the selector side.

New features

  • Ajax: A responseURL field was added to jqXHR (#4339).
  • Ajax: An alternative completeCallback API for transports.
  • Serialize: Support for form-associated custom elements (#5245).

Removals

The getElementsByTagName and getElementsByClassName helpers were removed from core in favor of querySelectorAll (#3642). The release notes list no other breaking change, but if your code relies on those methods directly, search for them before upgrading.

Notable fixes

  • Selector: A ReDoS issue in identifier matching was fixed, quick selection paths are stricter, invalid escape code points decode to U+FFFD (#5845), and a Safari 27 regex interpreter bug has a workaround.
  • CSS: createElementNS is used to support XML documents (#4730), and the probe table for table style tests is emptied when it may be reused (#5932).
  • Core: Loops were refactored to avoid going past array bounds.
  • Performance: Duplicate removal in jQuery.uniqueSort was optimized.

Other changes

The docs add TuxCare as a commercial support vendor and introduce guidelines for machine-generated contributions. Tests were updated, with new ones for jQuery.ajaxPrefilter, jQuery.ajaxTransport, .data() on SVG elements and the serialize module.

Upgrade advice

  1. Search your code for jQuery-based use of getElementsByTagName and getElementsByClassName helpers.
  2. Test any custom code that deals with selector escape characters.
  3. Compare your Ajax and serialize flows before and after the upgrade.

Source: jQuery 4.1.0 release notes.