Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: jquery/jquery
base: 3.5.0
head repository: jquery/jquery
compare: 3.5.1
  • 13 commits
  • 18 files changed
  • 4 comments
  • 5 contributors
Commits on Apr 17, 2020
Closes gh-4673

(cherry picked from commit 73415da)
Commits on Apr 20, 2020
The change in gh-4603 made the object returned by `elem.data()`
a prototype-less object. That's a desired change to support keys
colliding with `Object.prototype` properties but it's also a breaking
change so it has to wait for jQuery 4.0.0.

A 3.x-only test was added to avoid breaking it in the future on this
branch.

Fixes gh-4665
Ref gh-4603
Closes gh-4666
This forbids unnecessary `eslint-disable` comments.

Ref gh-4095
Closes gh-4520

(cherry picked from 46f9810)
Commits on Apr 23, 2020
Commits on Apr 25, 2020
Commits on Apr 27, 2020
The "jQuery.ajax() - JSONP - Same Domain" test is firing a request with
a duplicate "callback" parameter, something like (simplified):
```
mock.php?action=jsonp&callback=jQuery_1&callback=jQuery_2
```

There was a difference in how the PHP & Node.js implementations of the jsonp
action in the mock server handled situations like that. The PHP implementation
was using the latest parameter while the Node.js one was turning it into an
array but the code didn't handle this situation. Because of how JavaScript
stringifies arrays, while the PHP implementation injected the following code:
```js
jQuery_2(payload)
```
the Node.js one was injecting the following one:
```js
jQuery_1,jQuery_2(payload)
```
This is a comma expression in JavaScript; it so turned out that in the majority
of cases both callbacks were identical so it was more like:
```js
jQuery_1,jQuery_1(payload)
```
which evaluates to `jQuery_1(payload)` when `jQuery_1` is defined, making the
test go as expected. In many cases, though, especially on Travis, the callbacks
were different, triggering an `Uncaught ReferenceError` error & requiring
frequent manual re-runs of Travis builds.

This commit fixes the logic in the mock Node.js server, adding special handling
for arrays.

Closes gh-4687

(cherry picked from commit 7b0864d)
The "focusin on document & window" test didn't cleanup `focusout` handlers
on `window` & `document`. This has been fixed.

Ref gh-4657
Commits on Apr 29, 2020
Closes gh-4686

(cherry picked from commit 1a7332c)
Commits on Apr 30, 2020
iOS 8-12 parses `<noembed>` tags differently, executing this code. This is no
different to native behavior on that OS, though, so just accept it.

Ref gh-4685
Closes gh-4694

(cherry picked from commit 11066a9)
@@ -3,6 +3,8 @@

"extends": "jquery",

"reportUnusedDisableDirectives": true,

// Support: IE <=9 only, Android <=4.0 only
// The above browsers are failing a lot of tests in the ES5
// test suite at http://test262.ecmascript.org.
@@ -3,6 +3,8 @@

"extends": "jquery",

"reportUnusedDisableDirectives": true,

"parserOptions": {
"ecmaVersion": 2017
},
@@ -1,10 +1,9 @@
language: node_js
os: linux
node_js:
- "8"
- "10"
- "12"
- "13"
- "14"
env:
- NPM_SCRIPT=test:browserless
jobs:
@@ -1,5 +1,3 @@
Authors ordered by first contribution.

John Resig <jeresig@gmail.com>
Gilles van den Hoven <gilles0181@gmail.com>
Michael Geary <mike@geary.com>
@@ -325,3 +323,5 @@ Wonseop Kim <wonseop.kim@samsung.com>
Christian Oliff <christianoliff@pm.me>
Christian Wenz <christian@wenz.org>
Sean Robinson <sean.robinson@scottsdalecc.edu>
Jonathan <vanillajonathan@users.noreply.github.com>
Pierre Grimaud <grimaud.pierre@gmail.com>
@@ -2,7 +2,7 @@

> jQuery is a fast, small, and feature-rich JavaScript library.
For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).
For information on how to get started and how to use jQuery, please see [jQuery's documentation](https://api.jquery.com/).
For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).

If upgrading, please see the [blog post for @VERSION](@BLOG_POST_LINK). This includes notable differences from the previous version and a more readable changelog.
@@ -21,23 +21,23 @@ Below are some of the most common ways to include jQuery.

#### Babel

[Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.
[Babel](https://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.

```js
import $ from "jquery";
```

#### Browserify/Webpack

There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this...
There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documentation. In the script, including jQuery will usually look like this...

```js
var $ = require( "jquery" );
```

#### AMD (Asynchronous Module Definition)

AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html).
AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](https://requirejs.org/docs/whyamd.html).

```js
define( [ "jquery" ], function( $ ) {
@@ -47,13 +47,13 @@ define( [ "jquery" ], function( $ ) {

### Node

To include jQuery in [Node](nodejs.org), first install with npm.
To include jQuery in [Node](https://nodejs.org/), first install with npm.

```sh
npm install jquery
```

For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes.
For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/jsdom/jsdom). This can be useful for testing purposes.

```js
const { JSDOM } = require( "jsdom" );

Showing you all comments on commits in this comparison.

@Miro696

This comment has been minimized.

Copy link

@Miro696 Miro696 commented on 65e9098 Sep 17, 2020

3.5.0 work correctly with animate on html and body but 3,5.1 throw error like animate( ) is not a function ex $(*html, body).animate( {
scrollTop: 100, }, 500)

@mgol

This comment has been minimized.

Copy link
Member Author

@mgol mgol commented on 65e9098 Sep 17, 2020

@Miro696 comments under a commit are not the best place to report bugs, please do so in a regular way. Before you report one, though, make sure you have a reproducible test case.

@Miro696

This comment has been minimized.

Copy link

@Miro696 Miro696 commented on 65e9098 Sep 19, 2020

@Miro696

This comment has been minimized.

Copy link

@Miro696 Miro696 commented on 65e9098 Sep 19, 2020