如果我添加了迁移插件,它是否会继续执行旧代码 – 或者只是在控制台中给我消息以帮助我追踪并修复问题?
有没有人从1.4.1跳到1.8或1.9?已经实现了迁移插件并看到它的工作原理和局限性?
解决方法
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.