Home >Web Front-end >JS Tutorial >jQuery Migrate 1.1.0 Released Notes_jquery
When developers need to use a new version of jQuery in their code, this plugin can be used in version 1.9 or 2.0 to detect which features have been deprecated or removed and can restore these features if necessary. For more information see the project README
jQuery Migrate 1.1 has made some improvements based on previous versions, including:
•Support console.trace() to track warning information, making it easier to diagnose errors.
•For invalid JSON, a warning message will be returned.
• Prompt "Logging is active" message to indicate that the plug-in is running.
•For security reasons, jQuery 1.9 limits string processing, and you can restore this functionality through the new Migrate plug-in. However, it is still recommended to use $.parseHTML() to process HTML.
•An error warning will be displayed for $("
Last month you can notice that jQuery released versions 1.9 and 2.0. The official team also launched version 1.0.0 of jQuery Migrate Plugin. This Plugin is used together with jQuery 1.9 or 2.0 to detect when jQuery has been removed or It is a function that will be removed so that the jQuey functions you developed before can continue to be used. However, it seems that many users do not know the use of this plugin and directly upgrade to 1.9 or 2.0 without loading the migrate plugin, causing the official to receive a lot of feedback back It's all about some old features not working. Half a month later, jQuery officially received a lot of migration plugin reports. This time, it can be loaded through jQuuery CDN. The program code is as follows.
Compressed version
A perfect jQuery upgrade does not require the migrate plugin, but in order to allow some removed functions to be used normally, the team developed the migrate plugin for developers to use. The main purpose of this migration plugin revision is to add debug mode and turn it on by default, so that developers can know which programs must be modified before they can be used normally with jQuery 1.9 or above. Below are the new features added in version 1.1.0.
1. The Trace function is turned on by default. If all Browser supports console.trace(), migrate will be displayed directly in the console interface by default. If the online website does not want to use this function, you can use jQuery.migrateTrace = false turns its functionality off.
2. “Logging is active” message: If you see this message, it means that the migrate plugin has been loaded on the web page. It is just to let the developer know that it has been loaded correctly. www.it165.net
3. Before jQuery 1.9.0, $.parseJSON() supported invalid JSON values, such as "" or undefined, and returned null instead of error message. This is also supported by Migrate 1.1.0 This function will display an error message.
4. The $(“