-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
Don't expose jQuery.swap #2058
Comments
We definitely don't use it in UI. |
I didn't even know it existed until i saw the related discussion. It's definitely not in mobile either. |
Sounds good to me! I think it was originally exposed so users could have control over when to retrieve useful values for hidden elements, but that use case is rare at best. |
OK then, assigning to myself! |
If it turns out something needs it but we don't want it internally, we could put it in jQuery Migrate. I doubt it's used externally and we never documented it, plus it's really bad practice from a performance standpoint. |
jQuery.swap was an undocumented API used only internally. With the modular AMD system we currently have it's not necessary to expose this function publicly under the jQuery object. Fixes jquerygh-2058 Closes jquerygh-2182
Even if we want/need
jQuery.swap
internally, we still shouldn't expose it, there is no reason to do it now that we have a robust modular architecture. The method is undocumented so technically we could stop exposing it whenever we want; no better moment to do it than the 3.0 release!I didn't see it in the code but just to make sure: @scottgonzalez & @arschmitz, I assume UI/Mobile doesn't depend on it?
The text was updated successfully, but these errors were encountered: