jQuery迁移插件处理弃用代码的效果如何?

前端之家收集整理的这篇文章主要介绍了jQuery迁移插件处理弃用代码的效果如何?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我很快将负责升级到jQuery 1.9.那说我知道我们住的几个地方();切换();徘徊();和browser();途中有很多惊喜,– 我很有信心.

如果我添加了迁移插件,它是否会继续执行旧代码 – 或者只是在控制台中给我消息以帮助我追踪并修复问题?

有没有人从1.4.1跳到1.8或1.9?已经实现了迁移插件并看到它的工作原理和局限性?

解决方法

官方jQuery网站很好地描述了 http://jquery.com/upgrade-guide/1.9/#jquery-migrate-plugin

The uncompressed development version of the jQuery Migrate plugin includes console log output to warn when specific deprecated and/or removed features are being used. This makes it valuable as a migration debugging tool for finding and remediating issues in existing jQuery code and plugins. It can be used for its diagnostics with versions of jQuery core all the way back to 1.6.4.

The compressed version of the plugin does not generate any log output,and can be used on production sites when jQuery 1.9 or higher is desired but older incompatible jQuery code or plugins must also be used. Ideally this would only be used as a short-term solution,but that’s a decision for you to make.

原文链接:https://www.f2er.com/jquery/176714.html

猜你在找的jQuery相关文章