Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml}]
[*.yml]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion src/disablePatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var disabledPatches = Object.create( null );

// Don't apply patches for specified codes. Helpful for code bases
// where some Migrate warnings have been addressed and it's desirable
// where some Migrate warnings have been addressed, and it's desirable
// to avoid needless patches or false positives.
jQuery.migrateDisablePatches = function() {
var i;
Expand Down
2 changes: 1 addition & 1 deletion src/jquery/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ migratePatchFunc( jQuery.fn, "toggleClass", function( state ) {

// If the element has a class name or if we're passed `false`,
// then remove the whole classname (if there was one, the above saved it).
// Otherwise bring back whatever was previously saved (if anything),
// Otherwise, bring back whatever was previously saved (if anything),
// falling back to the empty string if nothing was stored.
if ( this.setAttribute ) {
this.setAttribute( "class",
Expand Down
9 changes: 6 additions & 3 deletions test/data/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ window.expectMessage = function expectMessage( assert, name, expected, fn ) {
if ( expected === 0 ) {
assert.deepEqual( jQuery.migrateMessages, [], name + ": did not message" );

// Simple numeric equality assertion for messages matching an explicit count
// Simple numeric equality assertion for messages matching an explicit
// count
} else if ( expected && jQuery.migrateMessages.length === expected ) {
assert.equal( jQuery.migrateMessages.length, expected, name + ": messaged" );

// Simple ok assertion when we saw at least one message and weren't looking for an explict count
// Simple ok assertion when we saw at least one message and weren't
// looking for an explicit count
} else if ( !expected && jQuery.migrateMessages.length ) {
assert.ok( true, name + ": messaged" );

// Failure; use deepEqual to show the messages that *were* generated and the expectation
// Failure; use deepEqual to show the messages that *were* generated
// and the expectation
} else {
assert.deepEqual( jQuery.migrateMessages,
"<messages: " + ( expected || "1+" ) + ">", name + ": messaged"
Expand Down
2 changes: 1 addition & 1 deletion test/unit/jquery/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ QUnit[
} );

// z-index is tested explicitly as raw jQuery 4.0 will not have `jQuery.cssNumber`
// so iterating over it won't find anything and we'd like to ensure number values
// so iterating over it won't find anything, and we'd like to ensure number values
// are not warned against for safe CSS props like z-index (gh-438).
expectNoMessage( assert, "z-index", function() {
jQuery( "<div />" ).css( "z-index", 1 );
Expand Down
4 changes: 2 additions & 2 deletions warnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs

### \[fx-interval\] JQMIGRATE: jQuery.fx.interval is removed

**Cause**: As of jQuery 4.0, the `jQuery.fx.interval` property is no longer consulted and it's no longer possible to change the animation interval on browsers that do not support the `window.requestAnimationFrame()` method.
**Cause**: As of jQuery 4.0, the `jQuery.fx.interval` property is no longer consulted, and it's no longer possible to change the animation interval on browsers that do not support the `window.requestAnimationFrame()` method.

**Solution**: Find and remove code that changes or uses `jQuery.fx.interval`. If the value is being used by code in your page or a plugin, the code may be making assumptions that are no longer valid. The default value of `jQuery.fx.interval` is `13` (milliseconds), which could be used instead of accessing this property.

Expand Down Expand Up @@ -98,7 +98,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs

### \[toggleClass-bool\] JQMIGRATE: `jQuery.fn.toggleClass( \[ boolean \] ) is removed`

**Cause:** Calling `.toggleClass()` with no arguments, or with a single Boolean `true` or `false` argument, has been deprecated. Its behavior was poorly documented, but essentially the method saved away the current `class` value in a data item when the class was removed and restored the saved value when it was toggled back. If you do not believe you are specificially trying to use this form of the method, it is possible you are accidentally doing so via an inadvertent undefined value, as `.toggleClass( undefined )` toggles all classes.
**Cause:** Calling `.toggleClass()` with no arguments, or with a single Boolean `true` or `false` argument, has been deprecated. Its behavior was poorly documented, but essentially the method saved away the current `class` value in a data item when the class was removed and restored the saved value when it was toggled back. If you do not believe you are specifically trying to use this form of the method, it is possible you are accidentally doing so via an inadvertent undefined value, as `.toggleClass( undefined )` toggles all classes.

**Solution:** If this functionality is still needed, save the current full `.attr( "class" )` value in a data item and restore it when required.

Expand Down
Loading