hn.today

jQuery 4.1.0

github.com362 points191 comments
Screenshot of jQuery 4.1.0

jQuery 4.1.0 is a maintenance release focused on improving reliability, security, compatibility, and test coverage across the library. Its AJAX updates add a `responseURL` field to `jqXHR` and allow transports to use an alternative completion-callback API. Core changes replace `getElementsByTagName` and `getElementsByClassName` with `querySelectorAll` and adjust loops to avoid accessing elements beyond array bounds. CSS handling now supports XML documents through `createElementNS` and cleans up a table used in style-detection tests.

Selector changes address both correctness and performance: the release fixes escape handling, converts invalid escaped code points to the replacement character, improves duplicate removal, and works around a Safari regex-engine bug. It also tightens fast selection paths, standardizes document comparisons, and fixes a regular-expression denial-of-service vulnerability in identifier matching. Form serialization now supports form-associated custom elements.

The release also adds or updates tests for AJAX prefilters and transports, SVG data access, text extraction, serialization, and animation callback signatures. Other adjustments account for browser-specific test behavior and XML error-reporting differences. Documentation updates include a revised active-version table, information about jQuery 4.0, contribution guidance for machine-generated changes, and a new commercial support vendor. Overall, the changes refine existing APIs and behavior rather than introducing a sweeping redesign.

Read on github.com191 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.