Skip to content

Remove jQuery.fx.interval #4018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dmethvin opened this issue Mar 22, 2018 · 9 comments · Fixed by #5017
Closed

Remove jQuery.fx.interval #4018

dmethvin opened this issue Mar 22, 2018 · 9 comments · Fixed by #5017

Comments

@dmethvin
Copy link
Member

Migrate has to make some shaky assumptions about the implementation of core's animations in order to warn about jQuery.fx.interval. It would be simpler if we used a private value for the interval value (basically just hard-code the default 13) so that any use of jQuery.fx.interval could be indentified as deprecated. There is a slight risk that someone might be changing that value but it seems unlikely since we are already ignoring it except for two rare-ish cases: 1) IE9 always, 2) browsers when the document is hidden.

In addition, per some discussion on jquery/jquery-migrate#298 we may want to change from document.hidden to document.visibilityState since the standard has changed. From looking at caniuse.com it seems like IE10/IE11 support rAF and document.hidden but not document.visibilityState so I am not sure that is possible until we drop their support.

@mgol
Copy link
Member

mgol commented Mar 22, 2018

What caniuse.com entry? https://caniuse.com/#feat=pagevisibility shows full IE 10+ support, the MDN entry also claims IE 10 supports it. It seems that support is identical to document.hidden, isn't it?

@dmethvin
Copy link
Member Author

When I go into the console debugger in IE11 I see document.hidden -> false but document.pageVisibility -> undefined so they must have been going by the older spec.

@mgol
Copy link
Member

mgol commented Mar 22, 2018

You're right. It seems both MDN & Can I Use are out of date here.

@dmethvin
Copy link
Member Author

The problem seems to be that this is "Page Visibility 2" which had a first draft in March 2016. The previous "Page Visibility" is what IE10/11 use. The references don't seem to distinguish the two. The MDN page mentions visibilityState but doesn't call it out in the browser support matrix.

@markelog
Copy link
Member

markelog commented Mar 22, 2018

Yeah, I think I might have considered visibilityState (remember considering a lot of things). But don't remember the details.

When I go into the console debugger in IE11 I see document.hidden -> false but document.pageVisibility -> undefined

document.pageVisibility? Perhaps, you meant document.visibilityState? I do see it returning meaningful values in IE10/11.

If we do consider it, we should be really careful and like do some extensive testing I would suggest. I.e. just to see our test suite pass is not enough I think.

Since I remember our experience with https://bugs.jquery.com/ticket/10067, don't wanna see that again, haha

@mgol
Copy link
Member

mgol commented Mar 22, 2018

Ha, I do see document.visibilityState in IE 11 & 10. Where did document.pageVisibility come from? :)

@dmethvin
Copy link
Member Author

Oh duh, I got the property wrong! Nevermind.

@timmywil timmywil changed the title Make jQuery.fx.interval use private, switch to document.visibilityState? Make jQuery.fx.interval use private Sep 3, 2018
@timmywil
Copy link
Member

timmywil commented Sep 3, 2018

Simplified this ticket and just made it about privatizing our use of interval. The potential switch to document.visibilityState is a separate issue and I think those kind of what-if ideas are best tracked in the Roadmap.

@mgol
Copy link
Member

mgol commented Aug 6, 2022

I missed it but we already removed jQuery.fx.interval in #5017.

@mgol mgol closed this as completed Aug 6, 2022
@mgol mgol changed the title Make jQuery.fx.interval use private Remove jQuery.fx.interval Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants