Skip to content

Incorrect warning for use of jQuery.fx.interval #292

@daviesian

Description

@daviesian

Following on from #276 - I had the same problem and managed to catch it in the act. In particular, jQuery 3.2.1 does still reference jQuery.fx.interval in one place:

https://github.com/jquery/jquery/blob/3d732cca6b5076a9d13eee98e2b075b37384cd91/src/effects.js#L37

It appears that this is intentional, and will just resolve to 13 in normal usage. However, with jquery-migrate loaded, that line causes a deprecation warning to be incorrectly printed.

One could argue that this should only happen on particularly old browsers, but the if statement above also causes the setTimeout path to run when the document is hidden (if the browser is minimised, for instance). This seems like a perfectly legitimate use-case.

It's not entirely clear whether this is a bug in jQuery (where jQuery.fx.interval claims to have been deprecated) or in jquery-migrate (where the warning is being printed despite the fact that the usage is in core jQuery code). I'd be happy to work on a pull request for whichever people think is the culprit.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions